-
Notifications
You must be signed in to change notification settings - Fork 72
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
Automatic import suggestions slow down Luau LSP #749
Comments
Second this. |
bump |
1 similar comment
bump |
It's great that you're enthusiastic about getting this fixed, but repeated messages that only say variations of "bump" will not make the issue get resolved faster since issues are not prioritized based only on recent activity, and disrespect the time of the author and others who follow activity on this repository because they'll get notifications for these messages which don't add any useful information or insights. It's better to add some information that might actually help the issue get resolved, for example:
If you just want a status update, that's fine - but it's more appropriate for this to happen in e.g. this project's Discord channel and avoid cluttering the issue with it. |
Been looking into this one, indeed the main culprit seems to be the call to Suggest imports currently takes 15s on my example code base. If I remove that call, the request goes down to 1.2s, where suggest imports takes 387ms. Interestingly, the computation of the actual completion items takes ~500ms, but we we pay ~600ms just to return that result back to the language client (most likely all the cost to serialize it back to JSON, so we may need to look into the size of the result and performance of our JSON library afterwards). The cost for isIgnoredFileForAutoImports either comes from the path manipulation or the glob matching, so it is worth profiling the 2 to see if we can optimise it better. If there doesn't seem to be any easy wins, we can probably also cache the result of the ignore check so it's a 1 time cost (when creating the sourcemap). |
When this property is enabled, Luau LSP works slower than usual, and there appears delay before automatic suggestions are shown.

Also when Import Ignore Globs are empty, Luau LSP works way faster (2x-3x) even with enabled auto import suggestions.
The text was updated successfully, but these errors were encountered: