diff options
-rw-r--r-- | script/global.d.lua | 4 | ||||
-rw-r--r-- | script/vm/node.lua | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/script/global.d.lua b/script/global.d.lua index d647a69e..04b1855b 100644 --- a/script/global.d.lua +++ b/script/global.d.lua @@ -56,3 +56,7 @@ LOGLEVEL = 'warn' ---@type boolean LAZY = false + +-- (experiment) Improve performance, but reduce accuracy +---@type boolean +CACHEALIVE = false diff --git a/script/vm/node.lua b/script/vm/node.lua index 9b10fa9d..3866e56a 100644 --- a/script/vm/node.lua +++ b/script/vm/node.lua @@ -481,7 +481,7 @@ local delayTimer files.watch(function (ev, uri) if ev == 'version' then if ws.isReady(uri) then - if PREVIEW then + if CACHEALIVE then if delayTimer then delayTimer:restart() end |