diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-14 11:54:39 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-14 11:54:39 +0800 |
commit | 8381def3879a8099e116bdda0a85aa04cfb08a92 (patch) | |
tree | 6d34eb30233c0f65de6dc9c9e3a57b4e7326a955 | |
parent | b8892d691345cf25a80a5cd9fb33e1e94ad5be2b (diff) | |
download | lua-language-server-8381def3879a8099e116bdda0a85aa04cfb08a92.zip |
还是开着自动收集吧
-rw-r--r-- | server/src/service.lua | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/server/src/service.lua b/server/src/service.lua index d50f6c32..99eb2656 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -41,7 +41,7 @@ function mt:_callMethod(name, params) if suc then return res else - log.dbueg(('Task [%s] failed, params: %s'):format( + log.debug(('Task [%s] failed, params: %s'):format( name, table.dump(params) )) return nil, { @@ -230,17 +230,13 @@ function mt:on_tick() for _ in pairs(self._file) do count = count + 1 end - local last_mem = collectgarbage 'count' - collectgarbage() local mem = collectgarbage 'count' log.debug(('\n\z - Collectgarbage\n\z + State\n\z Mem: [%.3f]kb\n\z - Cache: [%d]\n\z - GC: [%.3f]kb'):format( + Cache: [%d]'):format( mem, - count, - last_mem - mem + count )) end end @@ -261,7 +257,6 @@ function mt:listen() end return function () - collectgarbage 'stop' local session = setmetatable({ _file = {}, _needCompile = {}, |