Visitar URL original
Painting is significantly slower (UI freezes) in Chrome/Chromium when viewing issue20722.pdf · mozilla/pdf.js · Discussion #21946 · GitHub
Skip to content
Discussion options

You must be logged in to vote

This file is the dark version from #20722, made with Ghostscript's setcolortransfer, so its graphics states carry a transfer function (/TR). pdf.js draws /TR by setting the canvas filter to an SVG feComponentTransfer filter (the "TR" case in src/display/canvas.js), and that filter then runs on every fill and stroke. Chromium is really slow at that. A quick test page with 500 small filled rects, rendered with pdfjs-dist 6.3.289 in headless Chromium 141, took about 15 ms without /TR and 3 to 13 seconds with it.

On viewer.html: the setting that matters here is enableHWA. The viewer turns it on (web/app_options.js), but getDocument() defaults to false, and then the page canvas is created with w…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Mookiepiece
Comment options

Answer selected by Mookiepiece
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants