Bug 236473 - Large page that loads MathJax becomes unresponsive, only in Safari
Summary: Large page that loads MathJax becomes unresponsive, only in Safari
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 15
Hardware: All macOS 10.15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-10 16:58 PST by Lee Campbell
Modified: 2022-02-17 16:58 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lee Campbell 2022-02-10 16:58:02 PST
On this page, https://neurips.cc/Conferences/2019/Schedule, Safari becomes so laggy that it is unusable for about 25 seconds. This does not happen in Firefox, Chrome, or Edge.  During this period, it is difficult to use the filter controls at the top of the page. This page is large and I believe the problem comes from the performance of a javascript library called MathJax.  

Firefox's handling of this page is exemplary.

It's not a bug, but it's one of those cases where Safari doesn't do as well as it's competitors.
Comment 1 Alexey Proskuryakov 2022-02-10 19:07:33 PST
I can reproduce this with macOS 12.2 on an M1 MacBook Pro. It's a lot shorter than 25 seconds on this hardware, and the webpage doesn't get completely unresponsive, but it's noticeably slow to respond to clicks in these filter controls.

There is a lot of relayout happening as part of handling mouse events (move, force, press).
Comment 2 Simon Fraser (smfr) 2022-02-10 20:21:40 PST
Lots of time under:
             1272 WebCore::RenderBlock::layout()  (in WebCore) + 500  [0x7ff911cb7014]
               1027 WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit)  (in WebCore) + 6468  [0x7ff913ac7dc4]
               | 1027 WebCore::RenderBlock::layout()  (in WebCore) + 500  [0x7ff911cb7014]
               |   775 WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit)  (in WebCore) + 579  [0x7ff913ac66c3]
               |   + 331 WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats()  (in WebCore) + 712  [0x7ff913ac1ee8]
               |   + ! 131 WebCore::RenderBlockFlow::addIntrudingFloats(WebCore::RenderBlockFlow*, WebCore::RenderBlockFlow*, WebCore::LayoutUnit, WebCore::LayoutUnit)  (in WebCore) + 898  [0x7ff913ac3262]
Comment 3 Radar WebKit Bug Importer 2022-02-17 16:58:31 PST
<rdar://problem/89116795>