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?
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?