summaryrefslogtreecommitdiff
path: root/server/src/service.lua
diff options
context:
space:
mode:
authorunknown <sumnekosun@intranet.123u.com>2019-04-01 19:01:55 +0800
committerunknown <sumnekosun@intranet.123u.com>2019-04-01 19:01:55 +0800
commit0897093f8dafdcf37967aa0a8db2c94d2532a279 (patch)
tree6c27c931c1e1cc4208f30c6b0c3aa256bb438e1d /server/src/service.lua
parentc0708092a2c256d61c2cdbc3217a588bb86757ca (diff)
downloadlua-language-server-0897093f8dafdcf37967aa0a8db2c94d2532a279.zip
预加载过滤100k以上的文件
Diffstat (limited to 'server/src/service.lua')
-rw-r--r--server/src/service.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index af71e965..302b6335 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -218,6 +218,9 @@ function mt:readText(uri, path, buf, compiled)
log.debug('No file: ', path)
return
end
+ if #text > 100000 then
+ return
+ end
if self:getCachedFileCount() >= config.config.workspace.maxPreload then
if not self._hasShowHitMaxPreload then
self._hasShowHitMaxPreload = true