diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-08 16:41:16 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-08 16:41:16 +0800 |
commit | cccdf9fef2ed9cf4d554b9beea6386d0ac19e9bd (patch) | |
tree | fc93a813a6998ec997c6b91a052460a8cfd5de22 /server-beta/src/searcher | |
parent | c2128751fc2276e1b733dc272f678b2953b38b94 (diff) | |
download | lua-language-server-cccdf9fef2ed9cf4d554b9beea6386d0ac19e9bd.zip |
优化性能
Diffstat (limited to 'server-beta/src/searcher')
-rw-r--r-- | server-beta/src/searcher/eachField.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server-beta/src/searcher/eachField.lua b/server-beta/src/searcher/eachField.lua index 401378b7..b25ce1a1 100644 --- a/server-beta/src/searcher/eachField.lua +++ b/server-beta/src/searcher/eachField.lua @@ -153,6 +153,10 @@ function searcher.eachField(source, callback) cache[#cache+1] = info end) unlock() + searcher.eachRef(source, function (info) + local src = info.source + searcher.cache.eachField[src] = cache + end) for i = 1, #cache do callback(cache[i]) end |