-
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
TSServer is using 100% CPU on VS Code 1.33 #71886
Comments
This bug is not present in the insiders build. |
Please try deleting ATA cache folder (below) and see if that fixes the problem. We had a large performance regression caused by a combinatorially-explosive file being uploaded to DefinitelyTyped and an unpatched version of it might still be getting loaded. Thanks and please (Windows)
(Mac/Linux)
|
I checked |
@vasilev-alex @b02k5 @kylecorbelli @goodoldneon @Robfz @maxsbelt @ra50 @lewismorris can you try the above fix and let us know the results? Thanks! |
Didn't work for me. Code helper is still using about 100% CPU |
@vasilev-alex do you have a project (or subset of a project) that reliably reproduces the problem that you can share with us? |
@RyanCavanaugh it did work for me! |
@RyanCavanaugh Just a |
Mine is a TypeScript create-react-app project with styled components. I deleted all of Verdict: the above fix did not work 😭 |
|
the solution from @RyanCavanaugh works for me in macOS |
I've had the same problem and narrowed it down to the backticks used in a styled component
I have a basic setup here https://github.com/andrewcodes404/styledcomp-vscode-error/ which works fine until I uncomment the the styled component and then the vs code helper use all my CPU and vscode won't work properly and i get code --status
I have used @dziugasmeskauskas solution deleting the cache, @DanielRosenwasser should i be using a different version of typescript? |
I got the same issue here. Opening up a javascript file will cause codehelper to jump to 150% to 300% CPU usage. Tried remove the cache folders and resetting VS Code but it's not working. |
We're investigating at microsoft/TypeScript#30819 and pushing a mitigating fix at DefinitelyTyped/DefinitelyTyped#34564 |
The mitigation from the DefinitelyTyped PR has been merged - please do another cache clear and see how things are now. Note that after the cache clears, you will see a one-time perf hit during first launch - but after the types are downloading, interactive editing should be snappy again. Sorry again for the regression here. |
Also you may need pin typescript to |
Performance is still significantly worse than with 1.32.3. The styled-components update and cache clear reduce Code Helper's CPU usage, but do not fix it. In our project, it takes several seconds for 1.33 to resolve a change from |
@metrip can you share a project that displays this behavior? We're particularly interested in your config file (if any) |
Getting same problems as @metrip here, intellisense/typechecking are really slow :( my config file: { |
This bug is crippling my computer, in a simple gatsbyjs project using styled-components. Deleting |
The same bug has happened to me. I'm using styled-components with next.js framework. |
I am using type checking for javascript files and the |
@thakursaurabh1998 back to |
change the Terminal render type to dom @ALL solve the problem |
@xiaodoubaoldl could you explain how i can do that? thanks |
setting=>search "terminal renderer type" =>change auto to dom @andrewcodes404 |
It's still the same problem wether I use the new insiders or not |
Hey guys, I have successfully got rid of this problem just by following few steps mentioned here before.
Hope this will work for you guys as well. |
I had this issue for a couple days. Upgrading |
I had the same issue after upgrading to version 1.33, but after letting the program run for a little while, the CPU usage is now back to normal. |
Looks like deleting the folder having issues and recloning them from git fixed the issue for me. |
I'm closing this issue as the original problem @dziugasmeskauskas reported and that many others were also seeing was related to the styled components typings and clearing the caches (or updating the typings if you installed them locally) fixes things. See my comment for details. Again, if you have followed all the instructions and still see performance issues related to tsserver, please open a new issue on github and we can investigate |
hi @ondrejhudek, one week and still not working for me can I ask about your solution I have updated @types/node package to latest, currently have 11.13.2 I have reinstalled typescript package to specific version 3.3.4000 which was recommended here In your VSCode use workspace version of typescript Thanks |
If i create a new react next.js app with styled components it works fine, but in this project https://github.com/andrewcodes404/styledcomp-vscode-error2 everything grinds to a halt. Even when editing the react modules(not styled components) the CPU hits the roof with TSServer, I've followed the instructions, I have moved the project files and fresh install the npm modules but it still persists? @mjbvz when you say For JavaScript users: clearing the typings cache |
@andrewcodes404 Are you using VS Code 1.33.1? It should clear cache automatically. If you are still seeing problems, please open a new issue so we can continue investigating |
I'm using Mac and VS Code 1.33.1, |
Well I guess the only way for me was to disable "TypeScript and JavaScript Language Features" :-D |
Same for me on a new MBP 15" 2018. It was the same on my old MBP 15" 2015 (that I changed because of this bug by the way, I was thinking that my MBP was going mad in a middle of a sprint, so didn't have the time to check everything... So technically Microsoft owe me 3000€). Still not resolve today, "TypeScript and JavaScript" build-in extension make my processus goes + 300%... |
Up to this point, I hadn't had any luck resolving the issue for my workspace (gatsby + styled-components) using any of the methods suggested, including deleting However, the problem went away after I checked and unchecked |
My bad, still having the processor going crazy... |
@rdhox Nothing helped me as well. The only solution is to disable the build in extension TypeScript and JavaScript Language Features. You can find it by searching for in the extension menu |
|
If you are seeing performance issue, try using latest VS Code insiders build. Then if you are still seeing issues when using VS Code insiders (with TypeScript 3.5+), please open a new issue |
Issue Type: Performance Issue
Code helper is using 100% of my cpu. All plugins are disabled and no big files (or large amounts) are present in my workspace.
VS Code version: Code 1.33.0 (0dd516d, 2019-04-04T15:11:32.076Z)
OS version: Darwin x64 18.5.0
System Info
checker_imaging: disabled_off
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
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Process Info
Workspace Info
The text was updated successfully, but these errors were encountered: