RESOLVED DUPLICATE of bug 244879 245133
Asynchronously load CSS causes extremely slow performance
https://bugs.webkit.org/show_bug.cgi?id=245133
Summary Asynchronously load CSS causes extremely slow performance
mic.gallego
Reported 2022-09-13 05:36:02 PDT
Created attachment 462312 [details] High CPU usage Hi, I am not sure if this is a regression of Safari 16, but I have found that using the common trick to load a CSS asynchronously causes ton of reflow on Safari 16, which causes the CPU to skyrocket. You can reproduce that here: https://codepen.io/bakura10/pen/bGMwxKB Apparently, the load event is called over and over, which seems to cause constant reflow. If we load the CSS without that, the CPU consumption goes back to normal.
Attachments
High CPU usage (213.36 KB, image/png)
2022-09-13 05:36 PDT, mic.gallego
no flags
Without asynchronous loading trick (160.72 KB, image/png)
2022-09-13 05:36 PDT, mic.gallego
no flags
mic.gallego
Comment 1 2022-09-13 05:36:20 PDT
Created attachment 462313 [details] Without asynchronous loading trick
Ahmad Saleem
Comment 2 2022-09-13 07:19:36 PDT
rniwa@wekit.org - this is again same story: ...media="print" onload="this.media='all'"> I think it is already fixed in ToT via bug 232309. Is this shipped in Safari 16?
Sam Sneddon [:gsnedders]
Comment 3 2022-09-13 16:57:46 PDT
This was fixed in the re-landing of bug 232309. *** This bug has been marked as a duplicate of bug 232309 ***
Alexey Proskuryakov
Comment 4 2022-09-14 08:57:16 PDT
Was this also fixed by reverting older versions of that change?
Alexey Proskuryakov
Comment 5 2022-09-14 17:56:43 PDT
Actually, this couldn't be caused by an older version of that fix, as it never shipped.
Ryosuke Niwa
Comment 6 2022-09-14 21:41:54 PDT
*** This bug has been marked as a duplicate of bug 244879 ***
Alexey Proskuryakov
Comment 7 2022-09-14 22:21:58 PDT
So, this cannot possibly be a dupe of bug 244879...
Alexey Proskuryakov
Comment 8 2022-09-14 22:23:20 PDT
Unless the history of merges that I'm looking at is somehow all wrong...
Alexey Proskuryakov
Comment 9 2022-09-15 09:35:04 PDT
If you observed this issue with Safari Technology Preview, then it is indeed fixed by bug 244879. However, please let us know if you saw (and continue to see) it with an actual Safari 16 beta or release.
Note You need to log in before you can comment on or make changes to this bug.