Auto import suggestions heavily slows intellisense
See original GitHub issueTypeScript Version: 3.6.0-dev.20190628
Search Terms: auto import
auto import performance
Code
Enter this into a blank TypeScript project in VSCode:
import {S3} from 'aws-sdk'
const a: 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…
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Eclipse auto suggest list very slow - Stack Overflow
By auto suggest, I mean that intellisense that pops up when I write something. My problem is that if I write something like...
Read more >Auto import | WebStorm Documentation - JetBrains
Basic procedures to create and optimize imports in WebStorm. Learn more how to import the missing import or XML namespace.
Read more >More Improvements for VS Code's New Python Language ...
Working with Python 3, Pylance provides: Docstrings; Signature help, with type information; Parameter suggestions; Code completion; Auto-imports ...
Read more >7 Unnecessary VSCode Extensions You Should Uninstall Now
The number of VSCode extensions you have installed is one of the main reasons why you might find the editor slow and power-hungry, ......
Read more >Don't let TypeScript slow you down | by Vitaly Belman | Medium
Once we have intellisense, auto-complete and error checking on our own code, ... however, TypeScript will not allow you to use import.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 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).