LuaLS / LuaLS/lua-language-server
Diagnostics run `await.delay()` too often
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing PR 2664 and locating the diagnostic paths that call await.delay() for each AST node. Compare interactive and non-interactive behavior, then determine and measure a rescheduling strategy that reduces overhead without removing the interactive safeguard.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- devtools, performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100