summaryrefslogtreecommitdiff
path: root/script/parser/guide.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-29 17:19:43 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-29 17:19:43 +0800
commit3adf828e1a95b538e41ec586501844283872da35 (patch)
tree6299e96998aff6a86f68e986ffd89f234aeb89f3 /script/parser/guide.lua
parent524be33ca91cd6267da57dc2b9107728e27f5430 (diff)
downloadlua-language-server-3adf828e1a95b538e41ec586501844283872da35.zip
watch out from loop
Diffstat (limited to 'script/parser/guide.lua')
-rw-r--r--script/parser/guide.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 939aa462..54050c84 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -1221,6 +1221,7 @@ function m.status(parentStatus, interface, deep)
searchDeep= parentStatus and parentStatus.searchDeep or deep or -999,
interface = parentStatus and parentStatus.interface or {},
deep = parentStatus and parentStatus.deep,
+ clock = parentStatus and parentStatus.clock or osClock(),
results = {},
}
if interface then
@@ -2506,6 +2507,18 @@ function m.searchSameFields(status, simple, mode)
lock[obj] = true
max = max + 1
status.share.count = status.share.count + 1
+ if status.share.count % 10000 == 0 then
+ if TEST then
+ print('####', status.share.count, osClock() - status.clock)
+ end
+ if status.interface and status.interface.pulse then
+ status.interface.pulse()
+ end
+ end
+ if status.share.count >= 100000 then
+ logWarn('Count too large!')
+ break
+ end
m.checkSameSimple(status, simple, obj, start, force, mode, pushQueue)
if max >= 10000 then
logWarn('Queue too large!')
@@ -2513,7 +2526,7 @@ function m.searchSameFields(status, simple, mode)
end
end
end
- deallocQueue(queues, starts, forces)
+ --deallocQueue(queues, starts, forces)
end
function m.getCallerInSameFile(status, func)