SUMMARY When I open this pdf: https://www.schraeder.com/images/PDF/Fibel_Waermerueckgewinnung.pdf, scroll in the middle of the document and then change to another tab the GUI is hanging and I cannot scroll in the other document for a couple of seconds. When I switch to it GUI is hanging again for some time. I can repeat this for at least 50 seconds until the pdf fully is loaded/rendered and there are no hangs anymore. During all the time my 4-core CPU uses just about 113% (from 400%) and other programs work just fine. I have set memory performance to greedy, but this also happens under normal settings. CPU info: Quad Core model: AMD A10-7850K Radeon R7 12 Compute Cores 4C+8G bits: 64 type: MCP L2 cache: 2048 KiB Speed min/max: 1700/3700 MHz STEPS TO REPRODUCE 1. Open any pdf document 2. open https://www.schraeder.com/images/PDF/Fibel_Waermerueckgewinnung.pdf 3. fast scroll to middle of document 4. switch tab to pdf from 1. OBSERVED RESULT GUI hangs EXPECTED RESULT GUI shoud'nt hang SOFTWARE/OS VERSIONS Operating System: KDE Plasma Version: 5.16.3 KDE Frameworks Version: 5.60.0 Qt Version: 5.12.4 Kernel Version: 4.19.26-1-CHAKRA OS Type: 64-bit Processors: 4 × AMD A10-7850K Radeon R7, 12 Compute Cores 4C+8G Memory: 14,7 GiB of RAM
okular 1.9.2 hangs even without scrolling. Operating System: Arch Linux KDE Plasma Version: 5.17.90 KDE Frameworks Version: 5.66.0 Qt Version: 5.14.1
When using poppler command line tool $ pdfimages -list Fibel_Waermerueckgewinnung.pdf it takes > 2 minutes to generate information about 50 embedded images. I'd say that's peculiarly slow, we should have a closer look (will do, but need to find some time) and we should probably track the issue at poppler.
For whatever reason the document contains 166152 radial shading fills, each using a 3-samples, linear-interpolating color function. Poppler spends ~80% of overall processing time there. IOW, the document requests heavy processing and gets it. Try the document in other readers, e.g. PDF.js/Firefox, performance is same or worse than with Okular/poppler. Only Adobe renders the document considerably faster, seemingly they have some optimization. Albert, CCed you because I think you're familiar with the shading stuff in poppler, how would you suggest to continue here?
I mean it's totally not an okular bug but a "this document is crazy" bug, if it could be improved somewhere would be in poppler, so yes this should be closed and a poppler bug opened to see if it can be somehow solved by caching or similar.