summaryrefslogtreecommitdiff
path: root/server-beta/src/searcher/getLinks.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-11-15 10:29:07 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-11-15 10:29:07 +0800
commita0d017be1128485b189c24d47fdd087ae19602cb (patch)
tree58e017f874a0cb673c69f11c15f8ededa27de332 /server-beta/src/searcher/getLinks.lua
parentbfa16248754205f363134e61f930ebca16a2d21b (diff)
downloadlua-language-server-a0d017be1128485b189c24d47fdd087ae19602cb.zip
更新 parser
Diffstat (limited to 'server-beta/src/searcher/getLinks.lua')
-rw-r--r--server-beta/src/searcher/getLinks.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/server-beta/src/searcher/getLinks.lua b/server-beta/src/searcher/getLinks.lua
index ba436f86..db1072e3 100644
--- a/server-beta/src/searcher/getLinks.lua
+++ b/server-beta/src/searcher/getLinks.lua
@@ -28,7 +28,12 @@ function searcher.getLinks(source)
if not unlock then
return nil
end
+ local clock = os.clock()
cache = getLinks(source) or false
+ local passed = os.clock() - clock
+ if passed > 0.1 then
+ log.warn(('getLinks takes [%.3f] sec!'):format(passed))
+ end
searcher.cache.getLinks[source] = cache
unlock()
return cache