Bug 464716 - Very slow render time on restaurant menu
Summary: Very slow render time on restaurant menu
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 24.05.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-23 22:13 UTC by Reuben
Modified: 2024-07-27 14:24 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
restaurant menu (2.50 MB, application/pdf)
2023-01-23 22:13 UTC, Reuben
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben 2023-01-23 22:13:32 UTC
Created attachment 155544 [details]
restaurant menu

SUMMARY

I've attached a 2.5MB 7 "page" restaurant menu. It looks like it's just one long image rather than properly encoded.

Scrolling through this menu using the pager in the sidebar, there are 5-6 second pauses where the page that is scrolled to just displays as a white screen before it renders (on an 8 core i7). There appears to be no caching of previously rendered content (despite 32GB of ram being available) so scrolling up a previous page has the same issue, even if it was rendered just 30 seconds before. This seems to happen less when the app isn't full screened, so there may be some upscaling happening that slows it down.


STEPS TO REPRODUCE
1. Open attached document
2. Scroll using the sidebar (you may need to scroll up and down fast to trigger it)
3. 

OBSERVED RESULT
White screen for extensive period while rendering happens

EXPECTED RESULT
No delay in rendering

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Ubuntu 22.10
Operating System: Kubuntu 22.10
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 5.19.0-29-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700K CPU @ 4.00GHz
Memory: 30.8 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 530
Manufacturer: MSI
Product Name: MS-7978
System Version: 1.0
Comment 1 Oliver Sander 2023-01-24 15:23:17 UTC
I can confirm the multi-second pauses, even with the recent efficiency improvements in PagePainter.

The document is indeed a single page, with custom size 452 x 2529 m.  It contains a single image with 2312 x 12943 pixels.  Okular apparently renders only the visible parts, and that seems to take a while.
Comment 2 postix 2024-07-27 14:19:34 UTC
I've seen this too also for other PDFs.
Comment 3 postix 2024-07-27 14:24:03 UTC
Indeed one CPU core ramps up to 100% (I got a Ryzen 5900X) and the fan starts running loud while scrolling.
For comparison, the built-in PDF viewer of Firefox 128 does not show any of these issues.