PDF takes excessively long to render
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
| Performance Impact | low |
People
(Reporter: liamre, Unassigned, NeedInfo)
Details
(Keywords: perf:pageload, reproducible, Whiteboard: [pdfjs-performance])
Attachments
(1 file)
|
2.08 MB,
application/pdf
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/20100101 Firefox/122.0
Steps to reproduce:
View the attached PDF.
Actual results:
The PDF took 20+ seconds to render.
Expected results:
The PDF should have rendered quickly (compare to Edge).
| Reporter | ||
Updated•2 years ago
|
Comment 1•2 years ago
•
|
||
I'm reproducing the issue on latest Nightly 124.0a1 with Win 11 and macOS 13 as well. It seems that the issue occurs in Firefox for a long time, I am able to see the render delay on older Nightly builds (e.g. 67.0a1, 2019-02-02).
Thanks for reporting this, Liam! Maybe a developer will pick and consider fixing it.
Changing this bug to "NEW".
Updated•2 years ago
|
Comment 2•1 year ago
|
||
We seem to be keeping the GPU pretty busy with the drawing the DVA logo: https://share.firefox.dev/3x57nzK
I'm not entirely sure if this should be fixed in the viewer or Canvas. Lee might have an idea.
Comment 3•1 year ago
|
||
The Performance Impact Calculator has determined this bug's performance impact to be low. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.
Platforms: Windows
Page load impact: Some
Websites affected: Rare
[x] Able to reproduce locally
Comment 4•1 year ago
|
||
It seems like PDF.js is doing a lot of unfortunate creation of DrawTargets and mixing accelerated and unaccelerated targets, causing substantial amounts of readbacks. This might be one of those cases where the hypothetical proposal to just not enable acceleration by default in PDF.js will will work better.
Comment 5•1 year ago
|
||
Marco, is this related to bug 1874013? The profile from Bas shows a lot of canvas creation going on, which I am seeing also in the AC2D profiles as well outside of Windows... but on Windows, we are using Direct2D acceleration instead, still showing the same pattern of problematic performance. This might hint that there are certain patterns within the PDF.js code that could be aggravating this?
Updated•1 year ago
|
Updated•1 year ago
|
| Reporter | ||
Comment 7•10 months ago
|
||
Yes, I can still reproduce in Firefox Nightly 140.0a1 (2025-05-19) on macOS 14.7
Comment 8•10 months ago
|
||
This means it isn't related to hardware acceleration, since it is disabled for pdf.js.
Updated•2 months ago
|
Description
•