From 6a894485b4eab731adbbdbf3803dca75dc35e83c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 12 Oct 2022 19:42:16 +0800 Subject: change flag --- script/global.d.lua | 4 ++++ script/vm/node.lua | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3