Bug 452406 - Poor peformance when opening PDF with lots of forms
Summary: Poor peformance when opening PDF with lots of forms
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-08 14:49 UTC by Nicolas Fella
Modified: 2023-09-11 15:37 UTC (History)
1 user (show)

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


Attachments
The PDF (334.40 KB, application/pdf)
2022-04-08 14:49 UTC, Nicolas Fella
Details
Hotspot Flamegraph (844.33 KB, image/png)
2022-04-08 14:51 UTC, Nicolas Fella
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Fella 2022-04-08 14:49:13 UTC
STEPS TO REPRODUCE
1. Open the attached PDF 
2. Click "Show Forms"
3. Scroll around in the PDF

OBSERVED RESULT
Scrolling lags a lot


EXPECTED RESULT
Scrolling works normally


SOFTWARE/OS VERSIONS
KDE Frameworks Version: master 
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Poppler from master
Comment 1 Nicolas Fella 2022-04-08 14:49:28 UTC
Created attachment 148047 [details]
The PDF
Comment 2 Nicolas Fella 2022-04-08 14:51:25 UTC
Created attachment 148048 [details]
Hotspot Flamegraph
Comment 3 Nicolas Fella 2022-04-08 15:47:08 UTC
Commenting https://invent.kde.org/graphics/okular/-/blob/master/gui/pagepainter.cpp#L109 out makes it run smooth
Comment 4 Nicolas Fella 2022-04-08 15:54:11 UTC
page->_o_nearestPixmap always returns a pixmap with DPR 1, but a dpr of 2 is needed for me, hence the detach in setDevicePixelRatio
Comment 5 Nicolas Fella 2022-04-08 15:59:11 UTC
That also means the issue is only triggered on high-dpi screens
Comment 6 Bug Janitor Service 2022-05-17 11:54:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/612