Viewing large PDF causes persistent high CPU and makes Firefox UI unresponsive
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
Performance Impact | medium |
People
(Reporter: mirzmaster, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: perf:resource-use, reproducible)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0
Steps to reproduce:
Load the PDF at https://www.mississauga.ca/wp-content/uploads/2023/05/Mississauga-Cycling-Map-2021-Web-version.pdf.
Actual results:
The PDF is slow to render (slower than Edge) but not too awful. But even once loaded it I see increased CPU utilization around 20-30% on my Ryzen 5 3600. The rest of the Firefox UI becomes very slow/unresponsive, e.g. hovering over another tab takes a few seconds for the hover effect to show. Switching tabs takes 10 seconds.
Once the PDF tab is in the background, CPU utilization drops after 5 seconds to about 7% and the browser becomes responsive again. Returning to the PDF makes Firefox slow again.
Expected results:
I expected Firefox to remain responsive to user input, like Edge.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Performance' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•1 year ago
•
|
||
Can confirm all of that.
Profile with the PDF loading and scrolling up and down couple of times: https://share.firefox.dev/3Cz0vtG
And a profile of just switching tabs or moving mouse over toolbar icons : https://share.firefox.dev/3NyQi6M
Comment 3•1 year ago
|
||
based on the time spent in WR* threads, putting this in Core:Graphics: Webrender.
Updated•1 year ago
|
Comment 4•1 year ago
|
||
It looks like this may be causing a display list with a huge number of spatial nodes to be created.
Comment 5•1 year ago
|
||
Sounds like the same problem as bug 1813325 then.
Reporter | ||
Comment 6•1 year ago
|
||
One difference from #1813325 is that it isn't just the pdf UI that is unresponsive but Firefox UI more generally.
Comment 7•1 year ago
|
||
The Performance Impact Calculator has determined this bug's performance impact to be medium. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.
Platforms: Windows
Impact on browser: Causes noticeable jank
[x] Affects animation smoothness
[x] Able to reproduce locally
Updated•1 year ago
|
Updated•6 months ago
|
Comment 8•5 months ago
|
||
Firefox on Android never allows scrolling down or zooming in and out on these PDF files. It quickly becomes unresponsive
go to
https://monitoruloficial.ro/e-monitor/
select 30 april 2024
click any of 40X links
try to zoom in and/or scroll
the pdf opens flawless instantl in Adobe Reader Mobile once downloaded
Comment 9•5 months ago
|
||
Justin Link
Updated • 10 months ago
Performance Impact: ? → medium
no, performance impact should be highest possible, as whole browser becomes totally unresponsive and must force stop it
Updated•5 months ago
|
Comment 10•5 months ago
|
||
I'll leave it to Justin to check what the right performance rating is for this, note that it may depend on an estimate of how many users are affected compared to other high priority performance bugs.
Comment 11•5 months ago
•
|
||
I've cleared the Performance Impact field so that this will go back for performance triage again.
The bug as originally reported was Windows only and, although I don't remember the details now, it seems that I was able to reproduce locally.
If it is impacting Android as well then that would likely bump up the calculated performance impact (along with there being multiple users impacted).
Comment 12•5 months ago
|
||
Bug 1890537 has a profile, not sure if the underlying problem is the same.
Comment 13•5 months ago
|
||
Using the STR in https://bugzilla.mozilla.org/show_bug.cgi?id=1838865#c8, I can reproduce this on Android but not on Linux but that seems like it may be another problem. Unfortunately the original problem from comment 0 is no longer accessible. I'm going to close this bug and open a new one for the issue in comment 8.
Comment 14•5 months ago
|
||
The PDF from comment 0 is still accessible at https://web.archive.org/web/20230528162944/https://www.mississauga.ca/wp-content/uploads/2023/05/Mississauga-Cycling-Map-2021-Web-version.pdf.
Comment 15•5 months ago
|
||
Denis, are you able to reproduce this on older versions of Firefox? I'm trying to figure out if this is the same as bug 1896513.
Comment 16•5 months ago
|
||
The Android bugs are likely due to GPU accelerated canvas (see bug 1896513 comment 34 and bug 1890537 comment 17).
Comment 17•4 months ago
|
||
The Performance Impact Calculator has determined this bug's performance impact to be medium. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.
Platforms: [x] Windows [x] Android
Websites affected: Rare
Resource impact: Severe
[x] Able to reproduce locally
[x] Bug affects multiple sites
[x] Multiple reporters
Description
•