Bug 197647 - Rendering of Nature.com's "enhanced pdf" is super laggy
Summary: Rendering of Nature.com's "enhanced pdf" is super laggy
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 12
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2019-05-06 21:54 PDT by Oliver Hunt
Modified: 2019-05-08 09:19 PDT (History)
5 users (show)

See Also:

instruments output (3.26 MB, application/zip)
2019-05-06 21:58 PDT, Oliver Hunt
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2019-05-06 21:54:33 PDT
When loading the following paper:


The performance is atrocious for a while. There's clearly an element of deferred loading impacting the performance, but in chrome the page starts scrolling after quite a delay, and then scrolls smoothly. In Safari, the scrolling remains extremely laggy, and fails to update. Per the inspector we're spending a lot of time in layout and rendering rather than js.
Comment 1 Oliver Hunt 2019-05-06 21:58:31 PDT
Created attachment 369230 [details]
instruments output
Comment 2 Oliver Hunt 2019-05-06 22:08:08 PDT
Looks to be spending a tonne of time in/under/around 

CA::CG::draw_glyph_bitmaps(CA::CG::Renderer&, CA::CG::FillGlyphs const&, CA::CG::ShadowStyle const*, bool, bool)

Instruments really should develop an understanding of dispatch queues.
Comment 3 Radar WebKit Bug Importer 2019-05-06 23:22:34 PDT
Comment 4 Simon Fraser (smfr) 2019-05-08 09:19:52 PDT
The page seems to be very painting-heavy early on, then at some point get into a good state where it scrolls OK. Maybe rendering the pages lower down is triggering continual full repaints of the pages at the top.