question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto import suggestions heavily slows intellisense

See original GitHub issue

TypeScript 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:open
  • Created 4 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Pajncommented, 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.

1reaction
ProTipcommented, 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).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found