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

Log source modules that provide most completions #728

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rchl
Copy link
Member

@rchl rchl commented Jun 6, 2023

TypeScript can sometimes provide huge number of completions, depending on what modules are installed in the project, and in some editors that can cause performance issues.

For example having aws-sdk package installed in the project can result in additional 70MB of completion data returned from the completion response.

This change's purpose is to log those biggest offenders in the LSP communication log so that the user can use that information to potentially ignore completions from that module (using initializationOptions.preferences.autoImportFileExcludePatterns).

This is a bit of a power-user feature since many users will probably not check the LSP communication log. I suppose it might be more useful to have some more user-facing solution for that but not sure how this could be done.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

size-limit report 📦

Path Size
lib/cli.mjs 383.65 KB (+0.16% 🔺)

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

Successfully merging this pull request may close these issues.

None yet

1 participant