From caaf789052a8b39e23a1801c7348b92102102a3b Mon Sep 17 00:00:00 2001 From: poire-z Date: Sat, 20 Jul 2024 21:16:32 +0200 Subject: [PATCH] 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. --- frontend/document/credocument.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/document/credocument.lua b/frontend/document/credocument.lua index c29c6fc29..be737cd5c 100644 --- a/frontend/document/credocument.lua +++ b/frontend/document/credocument.lua @@ -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