lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

性能问题 CPU占用高

Open qin-tain opened this issue 1 year ago • 3 comments

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Other

Expected Behaviour

CPU 占用不应该偏高

Actual Behaviour

当项目和单个文件有一定的规模时,CPU 占用偏高

Reproduction steps

  1. 项目整体规模有一定的影响。以下是项目大概规模
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Lua                            186           9067          25097          31556
  1. 单个文件大小是主要因素。问题明显出现是在一个用于临时测试的文件,该文件有 6000 多行,其中主要为 if 结构,包含约 330 个测试分支。在这个文件中一旦编辑一下,lua-language-server.exe 就 CPU 占用较高, 5%-9% 左右,散热风扇就开始转很快,补全和提示就会产生严重延迟。
  2. 当前文件不大时没有问题。

Additional Notes

No response

Log File

No response

qin-tain avatar Aug 17 '24 23:08 qin-tain