option to set higher cache values

Bug #1618567 reported by Helge Hielscher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qpdfview
Fix Released
Wishlist
Adam Reichold

Bug Description

I would like to have an option to put the whole document into memory, like what the "greedy mode" of okular does.

Therefore I increased the prefetchDistance and cacheSize in qpdfview.conf

Result:
with a cacheSize greater than 2147483647 it seems that cache gets disabled

Expexted Result:
to be able to use all available memory to cache a PDF (to be able to skim through pages, e.g. looking for a photo or illustration)

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello Helge,

the limitation is due to Qt's QCache class tracking its costs using a 32-bit signed integer, hence above 2^32 - 1, the number overflows and you get essentially zero maximum cost. Currently, qpdfview tracks its pixmap costs in byte which yields an effective limit of 2 GB cache size.

I changed trunk to do the tracking kilobytes raising the limit to 2 TB instead. The configuration key "cacheSize" does support the "M" and "K" suffixes to make storing such values possible. qpdfview itself will always store the number using the "K" suffix and users of the GUI should not see any difference expect the maximum cache size available via the settings dialog is now 8 GB instead of 2 GB.

Best regards, Adam.

Changed in qpdfview:
status: New → Incomplete
status: Incomplete → Fix Committed
importance: Undecided → Wishlist
assignee: nobody → Adam Reichold (adamreichold)
milestone: none → 0.4.17
Changed in qpdfview:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.