option to set higher cache values
Bug #1618567 reported by
Helge Hielscher
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)
Changed in qpdfview: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.