-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Slow completions request not cancellable while collecting auto-imports #44826
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
Comments
I think what youโre looking at is the completions request for when you typed |
Yes that's significantly faster! |
I was hoping I could workaround the slowness by disabling auto imports / import suggestions, but from the logs it looks like TS still "collects" the auto imports regardless of these settings: "typescript.suggest.autoImports": false,
"typescript.suggest.includeCompletionsForImportStatements": false,
"javascript.suggest.autoImports": false,
"javascript.suggest.includeCompletionsForImportStatements": false |
TypeScript/src/services/completions.ts Line 1841 in 837ed96
|
Are these two different settings or are they the same thing?
|
Perhaps VS Code needs to add a new setting to pass through the |
Oh yeah, those are different. |
FYI: just tested #45138 via the nightly and it seems to work really well now. Thank you! With regards to microsoft/vscode#127663:
I just tested it again and I'm definitely seeing Here is a video to demonstrate. You can see that the relevant setting is disabled. https://www.dropbox.com/s/wgfdw0aycg7g4bl/Screen%20Recording%202021-07-22%20at%2007.48.34.mov?dl=0 To rule out extensions or user settings, I tested this using a fresh instance of VS Code: Are you able to reproduce using my steps from the original post above, i.e. inside of the |
Ah, itโs on completion details that itโs building the map. Ok, I can fix that. |
@OliverJAsh actually, I think I already did. The log you just sent me is for TS 4.3.4. Iโm pretty sure I fixed that issue in #44713. Can you send me a log showing the issue with the nightly build, if it repros there? I think it shouldnโt. |
I can confirm that this is fixed in the nightly. When I enable the setting I no longer see |
Bug Report
๐ Search Terms
auto completions complete suggestions performance slow vs code typing
๐ Version & Regression Information
โฏ Playground Link
N/A
๐ป Code
typescript-completion-performance
. This is a private repository but I believe some members of the TS team already have access from debugging previous issues. If you don't have access, please send me your email address so I can provide access (TS team members only).yarn
to install TSapp/helpers/my-test.ts
and wait for TS to finish initialisingType
O.
and wait for completions to appear.๐ Actual behavior
Completions should appear quickly.
๐ Expected behavior
Completions appear slowly.
tsserver.log
web.mov
In the TS server log we can see that completions are slow:
The response for the
completionInfo
command contains an enormous body (see full log file) which seems to describe the exports for every single module in the TS project. I find this surprising considering we're only asking for the exports of one module.I tested this in a fresh VS Code instance with no extensions.
I also tested this in a new folder and it was much faster.
tsserver.log
simple.mov
The text was updated successfully, but these errors were encountered: