Five second delay loading PDFs after browser has been running for a while
Shortly after launching, Firefox loads small PDFs very quickly, within 200ms. However, a short while after launch, it starts delaying about five seconds before opening the same, small PDFs, whether they are on disk or fetched via the network, and regardless of whether they are cached locally or downloaded. I've examined the performance profile of the slow loads, but I'm not sure what to look for.
Restarting the browser reliably makes PDF loads snappy again, but the effect doesn't last very long, less than an hour before the five second delay returns.
I've seen this behavior on all PDFs, but here are two examples:
https://lawfilesext.leg.wa.gov/biennium/2023-24/Pdf/Bills/House%20Bills/2468.pdf?q=20240122183210 (68 KB) https://s1.q4cdn.com/806093406/files/doc_downloads/test.pdf (3.82 KB)
所有回覆 (6)
What security software do you have? Did you check for issues with your security software?
Hey cor-el! I don't run any sort of third-party security software on this macOS device. If it's relevant, I do use Firefox profiles, for a work and a home profile. On macOS, that means I have two Firefox instances running.
I've observed something else. If I download a small PDF — for example, this one — I can open it various ways:
- I can paste its local file path, file:///Users/ravron/Downloads/6015.pdf, into the URL bar. If I do this, it takes several seconds to load.
- Once it's loaded, I can press ⌘R to reload. This reload also takes several seconds.
- I can drag the file from Finder to the Firefox tab bar. This loads instantly.
- I can right-click the file in Finder and choose Open With > Firefox.app. This loads instantly as well.
Another fascinating twist I've noticed as I experiment further. If I start loading the PDF, then switch to another tab in the same window, it finishes loading immediately. However, if I remain on the tab while it loads the PDF, it takes the full ~five seconds.
I've also tried disabling all extensions, but this seems to have no effect on the issue.
Start Firefox in Troubleshoot Mode to check if one of the extensions ("3-bar" menu button or Tools -> Add-ons -> Extensions) or if hardware acceleration or if userChrome.css/userContent.css is causing the problem.
- switch to the Default System theme: "3-bar" menu button or Tools -> Add-ons -> Themes
- do NOT click the "Refresh Firefox" button on the Troubleshoot Mode start window
Hmm, I recently updated to v122.0 and so far the issue has not reoccurred. If and when it reoccurs, I'll update this thread with the results from trying Troubleshoot Mode, but for now I'll consider it closed. Thank you for your help this far!