Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LuaLS 3.9 feels sluggish and shows stray warnings #2660

Closed
emmericp opened this issue May 12, 2024 · 8 comments
Closed

LuaLS 3.9 feels sluggish and shows stray warnings #2660

emmericp opened this issue May 12, 2024 · 8 comments

Comments

@emmericp
Copy link
Contributor

Using sumneko.lua 3.9.0 in VSCode.

It overall feels rather sluggish overall and sometimes it shows seemingly random diagnostics in seemingly unrelated locations while I'm editing a file. This seems to happen since I upgraded to 3.9.0 yesterday.

For example, it often complains about random missing fields. Warnings like these keeps showing up while editing the code in places unrelated to the types it is complaining about. They disappear after a few seconds.

screenshot
screenshot

log file
luals.log

@emmericp
Copy link
Contributor Author

emmericp commented May 12, 2024

Two weird things in the log:

  • seemingly random diagnostics like redundant-value or trailing-space are very slow in the file I was editing (Runner.lua) while the log was being recorded
  • it seems to be running diagnostics on at least one library file (.vscode/extensions/ketho.wow-api-0.13.6/EmmyLua/API/GlobalAPI/API3.lua) despite diagnostics.libraryFiles being set to Opened and the file not being open

@emmericp
Copy link
Contributor Author

The diagnostics that are being called out in the log as slow are not actually slow. Running --check with redundant-value enabled or disabled only makes a difference of maybe 1 second (56 vs. 57 seconds total time).

@jellyton69
Copy link

jellyton69 commented May 12, 2024

Workspace loading is really bad after the update, my workspace won't even load fully and gets stuck ~halfway through the loading process, which normally loads ~2965 files in less than a minute, I've been hung on 951/2965 for 15 minutes now, force terminating the extension and reloading doesn't fix it. Log shows it stopping at a random file every time, size: 0.040 KB.

@Vladinator
Copy link

Vladinator commented May 13, 2024

I can confirm that my workspace started to load exceptionally slower after the recent update, and this wasn't the case a week ago when I was working on my projects. My workspace is around ~500 (whatever the metric is that the notification talks about when processing) and it takes around 2 minutes to finalize. This happens whenever anything changes, it does the scan again and it's exceptionally slower than the previous 2-5 seconds from a week ago.

@emmericp
Copy link
Contributor Author

I guess there is something wrong with coroutine scheduling; i removed all calls to await.delay() from core/diagnostics/*.lua and it's now super fast again.

@comedinha
Copy link
Contributor

Same here, the lastest changes in bee makes take too long to load and diagnoses the files

@pidgeon777
Copy link

I am currently utilizing LazyVim, a Neovim configuration, in conjunction with the Lua Language Server (lua_ls). However, I have been encountering an issue for the past few days where the workspace fails to load correctly. The loading process appears to halt randomly at different stages, preventing me from accessing my workspace. This issue is intermittent and the exact point at which the loading process gets stuck varies.

@sumneko
Copy link
Collaborator

sumneko commented May 20, 2024

Should be fixed in 3.9.1

@sumneko sumneko closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants