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

[Question] Large size type annotation file cause low performance. Is it possible to fix it?

Open SHthemW opened this issue 1 year ago • 1 comments

In my project I have a special Lua file used to give type hint, it defines many field such as:

---@class UnityEngine.TransitionType
---@field Normal UnityEngine.TransitionType
---@field Entry UnityEngine.TransitionType
---@field Exit UnityEngine.TransitionType
UnityEngine.TransitionType = {}

---@class UnityEngine.StateInfoIndex
---@field CurrentState UnityEngine.StateInfoIndex
---@field NextState UnityEngine.StateInfoIndex
---@field ExitState UnityEngine.StateInfoIndex
---@field InterruptedState UnityEngine.StateInfoIndex
UnityEngine.StateInfoIndex = {}

--- ...more below

It contains all type using in my project so it's very large (about 5000KB), and caused low diagnostic speed when LLS runs. Is it possible to optimize performance for those special type annotation file? Or I have to simplify this Lua file.

SHthemW avatar May 21 '24 13:05 SHthemW