LuaLS / LuaLS/lua-language-server
[Question] Large size type annotation file cause low performance. Is it possible to fix it?
還沒有人認領這個 Issue。
- 主要語言
- Lua
- 星號
- 4.4k
- 分支
- 442
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
使用報告的 5,000 KB Lua 型別註解檔案重現速度變慢的問題,並將診斷速度與較小檔案進行比較。追蹤處理註解的診斷路徑;當大型檔案案例在不遺失型別資訊的情況下實現顯著的效能提升時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- lua
- 領域
- devtools, performance
- Issue 類型
- 缺陷
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100