cre cache: allow for disabling compression (#3670)

With ["cre_compress_cached_data"] = false in settings.reader.lua.
Not using compression for cache files does indeed take more space,
but it does speed up opening, rendering, page turns, and closing,
with big documents.
Bump base and crengine.
This commit is contained in:
poire-z
2018-02-10 00:45:46 +01:00
committed by GitHub
parent 39738955f3
commit 501df2ebc2
2 changed files with 3 additions and 2 deletions

View File

@@ -47,7 +47,8 @@ function CreDocument:cacheInit()
if lfs.attributes("./cr3cache", "mode") == "directory" then
os.execute("rm -r ./cr3cache")
end
cre.initCache(DataStorage:getDataDir() .. "/cache/cr3cache", 1024*1024*32)
cre.initCache(DataStorage:getDataDir() .. "/cache/cr3cache", 1024*1024*32,
G_reader_settings:nilOrTrue("cre_compress_cached_data"))
end
function CreDocument:engineInit()