2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00

CRE call cache: don't wrap setViewMode (#12194)

Avoid highlights' xpointers to be recomputed when
switching between page and scroll mode, which could
make using "Auto-scroll when selection reaches a corner"
really slow when having a large number of highlights.

Closes #12156.
This commit is contained in:
poire-z 2024-07-20 21:16:32 +02:00 committed by GitHub
parent e38320038b
commit caaf789052
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1813,6 +1813,7 @@ function CreDocument:setupCallCache()
-- Assume all set* may change rendering
if name == "setBatteryState" then no_wrap = true -- except this one
elseif name == "setPageInfoOverride" then no_wrap = true -- and this one
elseif name == "setViewMode" then no_wrap = true -- and this one
elseif name:sub(1,3) == "set" then add_reset = true
elseif name:sub(1,6) == "toggle" then add_reset = true
elseif name:sub(1,6) == "update" then add_reset = true