Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.5.5-1, 6.7.0
-
Windows 10 22H2, MSVC 2019 x64
Description
Steps to reproduce
Open Windows Task Manager and keep an eye on the RAM usage while performing this test.
- Build and run the "PDF Single Page Viewer Example" https://doc.qt.io/qt-6/qtpdf-singlepage-example.html
- Use it to load this test PDF file: https://code.qt.io/cgit/qt/qtwebengine.git/plain/examples/pdf/multipage/resources/test.pdf?h=6.7
- Ensure that the 1st page is visible in the viewer (the page with the green Qt logo)
- Manually type "2000%" into the Zoom Selector combo box, and wait for the zoomed image to display
- Use your mouse cursor to highlight the last digit in Zoom Selector combo box, and then type "1" (to make the value jump to "2001%)
- Return to 100% zoom
- Increment the Page Selector combo box (the page with text) and repeat Steps #4 - #6
- Increment the Page Selector combo box (the page with the vector tiger) and repeat Steps #4 - #6
Outcomes
Page | Baseline RAM at 2000% zoom | Behaviour when switching from 2000% to 2001% |
---|---|---|
1 (Qt logo) | ~580 MB | The image disappears for a while, RAM spikes >2x to ~1280 MB, then image reappears, then RAM returns to baseline |
2 (Text) | ~710 MB | The image disappears for an instant then reappears, RAM always remains around baseline |
3 (Tiger) | ~470 MB | The image disappears for an instant then reappears, RAM always remains around baseline |
Notes
- The behaviour of Pages 2 and 3 are as expected. For Page 1, it's as if the old image isn't destroyed before the new one is rendered (even though it has already disappeared from the view)
- It looks like the whole page is rendered at the new zoom level, regardless of the viewport size (Evidence: Panning around the page does not increase RAM consumption). Would it be possible to rasterize/render only a subsection of the page when the viewport is much smaller than the page, to reduce RAM usage?
Attachments
Issue Links
- relates to
-
QTBUG-114953 PdfMultiPageView: Very poor memory performance when zooming in/out of long documents
- Closed
-
QTBUG-72476 QQuickImage renders blank frames while new images are loading
- Closed
-
QTBUG-66713 Be able to keep the original image displayed in an Image until the changed source image is available
- Closed