You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Auto import suggestions heavily slows intellisense #32174
Enter this into a blank TypeScript project in VSCode:
import{S3}from'aws-sdk'consta: s
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..
It's not clear what to do here - people looove auto-import, but clearly there are too many things in aws-sdk to performantly offer. It'd be a bummer if the feature just "turned off" when a complex library was around, but there's no obvious culling strategy for reducing the number of things in the list when there are too many.
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.
Activity
asvetliakov commentedon Jun 29, 2019
Same issue here. Using aws-sdk only in a few files but it slows down whole project
RyanCavanaugh commentedon Jul 10, 2019
It's not clear what to do here - people looove auto-import, but clearly there are too many things in
aws-sdkto performantly offer. It'd be a bummer if the feature just "turned off" when a complex library was around, but there's no obvious culling strategy for reducing the number of things in the list when there are too many.ProTip commentedon Jul 18, 2019
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).
Pajn commentedon Sep 23, 2019
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.
OliverJAsh commentedon Dec 7, 2021
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.
RyanCavanaugh commentedon Dec 3, 2025
Closing language service bugs related to the 6.0 implementation. For more information, see #62827