summaryrefslogtreecommitdiff
path: root/script-beta/vm/eachDef.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-08-15 17:05:06 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-08-15 17:05:06 +0800
commit820efa941bfc591c77cafcb4205386ea1795a03e (patch)
tree8bb6e0a5c642f0a45b37c5a493df8226078b524e /script-beta/vm/eachDef.lua
parentdd41a923bbe77698f7b44dad2ac29828060341ff (diff)
downloadlua-language-server-820efa941bfc591c77cafcb4205386ea1795a03e.zip
更新
Diffstat (limited to 'script-beta/vm/eachDef.lua')
-rw-r--r--script-beta/vm/eachDef.lua5
1 files changed, 3 insertions, 2 deletions
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)