-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Resolving modules and Intellisense Autocompletion pretty slow #16329
Comments
From @ChiefORZ on May 30, 2017 11:30 Maybe it is, because our Project has about 550 Files in 120 Folders? (excluding all folders mentioned above) |
From @nishp1 on May 31, 2017 23:26 We have a similar problem as well. We have ~900 folders with ~3900 files. Here is the tsconfig.json we are using:
I often see "Loading..." while module path is being resolved. Even when path is resolved (displayed as tooltip/quickinfo), |
To investigate what is causing this slowdown, please try collecting the typescript server log:
Each request to the tsserver should have timing information. Look for the
|
From @ChiefORZ on June 2, 2017 8:37 Thanks for the response! Made the server log executing only the issued problem. The here is my logfile. thanks for taking time for it :) |
From @thorn0 on June 4, 2017 21:31 I'm getting a similar effect with only 2 files in the project, one of which is a module that exports a big array, and the second file imports this module. At first after Code starts everything is fine, but then autocompletion becomes increasingly slow. This project and the logs can be found here. Might be a good isolated illustration of the issue. vscode: 1.13.0-insider f977399d58f7b64db35047fafe0c6e59e15f11d5 |
From @nishp1 on June 5, 2017 17:1 I was trying to debug typescript server over the weekend but oss version didn't load builtin extensions nor let me install chrome debugger to debug typescript server. Is there an argument I need to pass in to enable extensions in dev? |
From @ChiefORZ's logs, the long requests seem to be caused by the project being opened. Looking through some of the logs, it seems that the same project is opened multiple times, perhaps by being closed and then reopened |
@sheetalkamat can you take a look. |
@sheetalkamat i downloaded the latest VSCode Insiders, which included your commit for the possible Fix (Typescript Version 2.4) and tested the same situation as before and the result is unfortunately the same as before... here are the tsserver logs with Typescript 2.4 |
I have also sadly not seen any improvements :( |
I have looked into the shared tsserver log and it seemed to look like things are working as expected. The quick info took around 10ms I had also checked in #16539 which is not in release branch but should get you the improvement. Can you please try typescript@2.5.0-dev.20170619 and point to it using the settings:
to see if that helps a bit better. Thank you. |
thanks for looking into it so quickly. i tried out the typescript branch One sidenote:
Why is vscode trying to look up so many paths? In the tsserver.log i can see that he is looking up my
|
The exclude specification doesn't apply to module resolution. It only affects the initial sweep to collect the files. So the files from the node_modules will be collected only for module resolution. |
Just checking in, any update w/ this? |
Thank you all for the informations, I am in the same case. I am curious about one thing, however: Relative paths, like |
I have the same issue as @titouandk, everything has been super speedy for months, and then I added what's below to my tsconfig.json and now resolution takes a few seconds "baseUrl": "js",
"paths": {
"shared/*": ["js/shared/*"]
} Removing it and restarting and it's back to speedy |
This should be fixed now. Can you please give a try to typescript@next |
Thank you, it works like a charm! Just in case, here is the procedure to upgrade VSCode typescript version: |
Thank you @sheetalkamat. Intellisense is on 🔥 on a project with 4500+ files. |
Tried to adding the newest version of Typescript globally, and locally... Always getting the same errors: |
Seems like you are running into a different issue:
|
can you share some repro code? |
Looked at the stacktrace. In forEach(symbol.declarations, declaration => {
file.bindDiagnostics.push(createDiagnosticForNode(getNameOfDeclaration(declaration) || declaration, message, getDisplayName(declaration)));
}); Either |
https://github.com/ChiefORZ/ts-resolve as soon as i try to do anything, i get the error message: |
@ChiefORZ that log you just posted doesn't seem to show any errors? I couldn't cause one myself either; tried doing find-all-references on various identifiers. |
Ok, i tracked this Bug a bit and i found out that our dependencies in the https://github.com/ChiefORZ/ts-resolve |
I tried this with typescript@2.6.0-dev.20171011 and i cant repro this issue. There was no exception and the completions, quickinfo, goto definitions seem to work. tsserver.log It is possible that the reason you first saw exception before was addressed by #19053 Can you please try typescript@next to see if things are working at your end. |
From @ChiefORZ on May 30, 2017 11:28
Resolving modules and Intellisense Autocompletion in our Project takes a long time...
Maybe this problem is a result of using absolute paths.
Here is our
jsconfig.json
of the project:Can i somehow debug which directories VSCode is resolving to find my correct file.
And is there maybe a way to cache this resolved pathy specific for this IDE on my Client... to make the IDE not search my Filesystem every time - or do you plan on make this in the future
Copied from original issue: microsoft/vscode#27539
The text was updated successfully, but these errors were encountered: