From 820efa941bfc591c77cafcb4205386ea1795a03e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sat, 15 Aug 2020 17:05:06 +0800 Subject: =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/vm/eachDef.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'script-beta/vm/eachDef.lua') diff --git a/script-beta/vm/eachDef.lua b/script-beta/vm/eachDef.lua index 316a3cb1..2b30c0cd 100644 --- a/script-beta/vm/eachDef.lua +++ b/script-beta/vm/eachDef.lua @@ -24,9 +24,10 @@ function m.eachDef(source, results) return results end + local clock = os.clock() local myResults, count = guide.requestDefinition(source, vm.interface) - if DEVELOP and count > 100 then - log.warn('requestDefinition', count, guide.getRoot(source).uri, util.dump(source, { deep = 1 })) + if DEVELOP and os.clock() - clock > 0.1 then + log.warn('requestDefinition', count, os.clock() - clock, guide.getRoot(source).uri, util.dump(source, { deep = 1 })) end vm.mergeResults(results, myResults) m.searchLibrary(source, results) -- cgit v1.2.3