Bug 197647 - Rendering of Nature.com's "enhanced pdf" is super laggy
Summary: Rendering of Nature.com's "enhanced pdf" is super laggy
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 12
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-06 21:54 PDT by Oliver Hunt
Modified: 2024-03-11 05:35 PDT (History)
7 users (show)

See Also:


Attachments
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:

https://www.nature.com/articles/s41562-019-0592-8.epdf?author_access_token=P8LH-dm6-WcTUPR6aO7-FtRgN0jAjWel9jnR3ZoTv0PVOC_Ht62aJdy448-TIs1vEHEgxWIZfw6lDOHNp_3r3y8VYCNboUTmS0nPEm2Ws4QGEioiesbzQ34zH5LxsHGwtK5wgRMj2M8LqvCcDgMkMg%3D%3D

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
<rdar://problem/50529160>
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.
Comment 5 Ahmad Saleem 2024-03-11 01:12:03 PDT
It seems to work fine now in Safari 17.4, is it still reproducible for anyone?
Comment 6 Karl Dubost 2024-03-11 05:35:38 PDT
working for me too.