-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Auto import suggestions heavily slows intellisense #32174
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Same issue here. Using aws-sdk only in a few files but it slows down whole project |
It's not clear what to do here - people looove auto-import, but clearly there are too many things in |
I haven't had the chance to dive into this(I have never looked at the code in this project so I'm pretty much procrastinating) but I had hoped it was just an algorithm choice or caching issue.. But isn't everything? 😄 For my part I usually care more about auto-import suggestions for my own code. Having that option may be a nice stop-gap for people who don't want to completely disable it. Outside of that perhaps fuzzy-ish search through all the available types could be disabled? And/or a prefix index? I'm just spit-balling here as I have no clue as to why it should be so dang slow. Really I suppose I or somebody else would need to hook up the profiler and figure out where the time is(could be VSCode). |
Databases can search through millions of items in no times. A lot of exports from any library should not be a problem with the correct data structure and algorithm. If you want to provide suggestions while typing it sounds like the classbook example of a problem solved by a radix index/tree. |
I filed a suggestion for VS Code to show some suggestions whilst waiting for auto import suggestions, so that other suggestions are not slowed down by auto import suggestions: microsoft/vscode#138449. Unfortunately the issue was closed, but if there's no way to improve performance on TypeScript's side then I think this issue should be re-opened. It would be great if other people could chime in on that issue. For now, I've had to disable auto import suggestions entirely because they are so slow. |
Uh oh!
There was an error while loading. Please reload this page.
TypeScript Version: 3.6.0-dev.20190628
Search Terms:
auto import
auto import performance
Code
Enter this into a blank TypeScript project in VSCode:
Expected behavior:
Intellisense suggestions to pop up in under 500ms.
Actual behavior:
2+ seconds for the suggestions to appear.
After banging my head for a few hours trying to get to the bottom of intellisense slowness(next, insiders, old versions, etc, etc) I narrowed this down to auto import suggestions; disabling this feature removes the delay. I believe tsserver provides this service to VSCode? The aws-sdk does have a huge type surface area..
The text was updated successfully, but these errors were encountered: