-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
slow intellisense/type checking #53618
Comments
Does this reproduce in the latest VS Code build with all extensions disabled? |
@mjbvz I had the same problem, when i disabled all the extensions the problem disappeared on VS Code 1.25.0. |
I am experiencing this with 1.25.0 as well, the problem with finding a cause or validating a fix is that it dosen't instantly happen on starting vscode. It builds up over time where after a couple of hours the typechecker becomes unusably slow and even just typing becomes very unresponsive (takes up to a second sometimes after a few hours of work). The rest of my system is running completely fine in the meantime. One of 8 virtual cores (4 real cores with HT) is often used 100% by the vscode tsserver for a few seconds after saving a file. But everything else is below 10% usage and RAM is also still available, SWAP completely untouched. External tsc watchers and webpack builders are continuing to run fine without needing restarts even after days of running. I have however definitely experienced it with all extensions disabled in the stable 1.25.0. Testing the insider builds right now. |
FWIW I downgraded to 1.23.x and the problem went away. I'll try to reproduce in the next couple days on the latest insiders build but as @maritz has noted it takes a bit to get there as it's not a binary working/broken reproduction but more of a slow descent into sadness. |
Hm, not sure if it's related, but starting to select text in a file with some very long lines completely freezes vscode for several seconds in the insiders build. Otherwise it has been relatively stable today without any extensions installed. If it doesn't deteriorate tomorrow, I will try some extensions. |
So far everything is fine with 2 extensions re-installed on insider build: prettier and tslint. I'll try my full set of extensions over the next few days now. |
So far so good. Some unrelated problems, but the slowdowns did not appear for me with the following extensions installed:
I had a much shorter list on 1.25 at one point, so this list should have definitely triggered it imo. |
Mine was mostly better for a few days until yesterday when the same issues seem to have returned noticeably. I noticed some more patterns in the behavior: the delay is easiest to trigger when using go-to-definition to go to a file I haven't visited yet (or in some time) and is accompanied by a large jump in memory usage of the I still see other instances of the problem, such as very long wait times for Intellisense to come up with a list of suggestions, but the pattern for those is harder to identify. When that does happen, it tends to stick around for a while, which is to say that a file/workplace in a bad state doesn't seem to get better over time like it might with a simple empty-cache issue. I had reinstalled the TSLint, EditorConfig and GitLens extensions but disabled them for a couple hours prior to observing the above symptoms. The process explorer still indicates that |
@seansfkelley Did you try insiders or still on 1.25? |
Oops, sorry; this is 1.26.0-insider |
Here's an example of the types of issues that crop up routinely. I was editing code higher up in the file, which was of course breaking syntax further down in the file. The message is obviously erroneous I had time to take both of these screen shots, write this comment and then edit it, before I gave up and ran "Reload window",* at which point the file (without further edits) was considered valid, as it should be. Extensions are still disabled; insiders version * "Reload project" doesn't ever seem to help. |
Please try collecting the TS Server log:
Look through that log file for errors or stack traces. If you can share the log, I can also take a look to see if anything stands out
|
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
FWIW, these performance issues have been slowly tapering off, so I haven't seen cases as egregious as originally cited. I still have no idea what caused the issue in the first place (bad combination of libraries? over-aggressive cache clearing? slow filesystem?) but I've been staying on the insiders build and it's been improving back to the point where it used to be. If the issue returns, I'll try to collect some useful logs before reopening. |
Issue Type: Bug
Possibly related issues: #51819, #53541
1.24.x appears to have introduced a performance regression for performance in Typescript projects. The type checking process frequently hovers at 100% for several seconds at a time, with a corresponding lack of updates in the UI (red underlines where they don't make sense, out of date type information, Intellisense stating that it's "Loading...").
I switched to the insiders build and disabled all extensions and the issue persists.
This is especially bad when there's a lot of churn, such as changing branches or even when making a quick sequence of edits. Anecdotally, the longer said sequence of edits is the longer the type checker hangs, up to a limit where it appears to catch up (5-10 seconds or so? I haven't timed it). Changes made in one open file are often slow to be reflected in another open file (such as when I change the type of a value).
Is there a way to downgrade to 1.23.x? Both so it works better for me and so I can help verify that it was indeed 1.23 -> 1.24 that caused the problem. What other debugging information would help?
VS Code version: Code - Insiders 1.25.0-insider (0f080e5, 2018-07-04T14:06:34.850Z)
OS version: Darwin x64 17.4.0
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
vpx_decode: enabled
webgl: enabled
webgl2: enabled
code-insiders --status
The text was updated successfully, but these errors were encountered: