Summary: | Laggy scrolling on high DPI display - profiling indicates excessive copying in PagePainter::paintCroppedPageOnPainter | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | maximumsomething <maximumsomething> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | oliver.sander |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
maximumsomething
2022-10-18 19:32:34 UTC
Some of the calls to `setDevicePixelRatio` where probably introduced by me. The deep-copying was not intentional. I am not very proficient in Qt programming, and I wasn't even aware that these calls trigger a deep copy. Does https://invent.kde.org/graphics/okular/-/merge_requests/612 fix your issue by any chance? It would fix the biggest problem, yes. However, it turns out setting the dpr of the source pixmap isn't necessary at all. I went ahead and made a merge request that addresses both problems. See https://invent.kde.org/graphics/okular/-/merge_requests/665 . (In reply to maximumsomething from comment #0) > I was going to go ahead and fix these things myself, but I was wondering if > anyone familiar with the code knows why it was written this way/any gotchas > that might apply if the deep copies are not made. I thought I would just mention that I have made https://invent.kde.org/graphics/okular/-/merge_requests/240 long time ago. The intention was to simplify the code, just like the title suggests. I also tried to understand the code, and prepare it for peformance improvements. I was not aware of deep copying, actually. My patch still uses setDevicePixelRatio(), so it actually does not fix this problem. Honestly I lost interest in this. If you want, you may continue the work, or just look at it if it helps you to understand anything. :) Fixed by merging https://invent.kde.org/graphics/okular/-/merge_requests/665 . |