diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-12 14:24:38 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-12 14:24:38 +0800 |
commit | d402f6fed15c9ba61edf7f6b7b22e648c7cded34 (patch) | |
tree | 5548c2dafc91a7d86f554090d06c9626c6cd988a /server/src/vm/value.lua | |
parent | 37391cdd8171d70bcdbb90846636c0fb68b67be3 (diff) | |
download | lua-language-server-d402f6fed15c9ba61edf7f6b7b22e648c7cded34.zip |
减少清理频率,但会略微增加内存
Diffstat (limited to 'server/src/vm/value.lua')
-rw-r--r-- | server/src/vm/value.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua index 7eb7784e..06a86e23 100644 --- a/server/src/vm/value.lua +++ b/server/src/vm/value.lua @@ -224,7 +224,7 @@ function mt:flushChild() end end infos._count = count - infos._limit = count + 10 + infos._limit = count * 1.1 + 10 infos._version = listMgr.getVersion() for index in pairs(self._child) do if not alived[index] then @@ -404,7 +404,7 @@ function mt:addInfo(tp, source, ...) end end infos._count = count - infos._limit = count + 10 + infos._limit = count * 1.1 + 10 infos._version = version end end @@ -422,7 +422,7 @@ function mt:eachInfo(callback) end end infos._count = #list - infos._limit = infos._count + 10 + infos._limit = infos._count * 1.1 + 10 infos._version = listMgr.getVersion() table.sort(list, function (a, b) return a._sort < b._sort |