LuaLS / LuaLS/lua-language-server

Diagnostics run `await.delay()` too often

未關閉
#2,665 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Lua
星號
4.4k
分支
442
PR 合併指標
30 天內沒有已合併 PR

描述

https://github.com/LuaLS/lua-language-server/pull/2664 got a 25% speed increase by disabling await.delay() for the non-interactive use case.

Many diagnostics call `await.delay()` for every single ast node they check, so running all diagnostics on a file will probably reschedule the thread more than once per node which is a significant overhead.

I guess fully removing it for the interactive use case isn't a great solution, but maybe there is some kind of middleground like only rescheduling only every n calls?

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先檢視 PR 2664,並找出針對每個 AST 節點呼叫 await.delay() 的診斷路徑。比較互動式與非互動式行為,然後決定並測量一種能降低額外負擔、同時不移除互動式防護機制的重新排程策略。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
lua
領域
devtools, performance
Issue 類型
重構
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。