-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
High cpu usage with mobx project on windows #35716
Comments
@blikblum Can you please follow these instructions to collect performance information about which process is causing the high cpu usage. Share the output of |
After adding import 'sup|' Ctrl + Space. The affecting is electron_node tsserver.js. It remains with that cpu usage until close app. BTW the cpu is somewhat new and powerful
|
Where are you seeing the high cpu usage? The output of |
Both in windows task manager and vscode process explorer. Also the CPU FAN starts spinning continuously. Finally, the task (autocomplete the import) does not complete. |
@blikblum Thanks. One last thing to try: upgrade your workspace to use Does that fix the issue? I haven't been able to repo this on my machine. CPU usage is high for a little when we first load the project while but then drops off |
Yes. Autocomplete is instantaneous and no CPU usage. Max is 4% in window task manager |
It was working fine until i found a new reproducible situation: Checkout https://github.com/blikblum/slick-router/tree/vscode-cpu-test Probably needs yarn install Put cursor after I tested three times in a row and all the same behavior https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next is installed and enabled
|
@blikblum Thanks for the detailed repro steps! |
@blikblum I immediately get a completion list with a single item: |
Now, if i use https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next, it works instantly. Disable it brings back the issue
Yes. It keeps loading indefinitely |
@blikblum, that extension just tells VS Code to use the latest build of TypeScript. From your description, it sounds like the version that shipped with VS Code 1.41.1 may have had a performance issue that has since been corrected. I'll see if I can repro the issue with that version. |
As far as I can tell, VS Code 1.41.1 shipped with TS 3.7.3 and I don't see anything in your package.json that would override that. Things seem to work well for me with that version. Fortunately, it sounds like you can reliably reproduce the problem. Can you please try collecting a TS Server Log? |
|
No log entry is added after 22:33h even if i quit the loading and try again |
Thanks! A few thoughts:
Edit: Just saw the completion call right at the end. I missed it because I was looking at responses. If the log ends right there, it's possible the language service is crashing. |
Crashing without a stack in the log is pretty unusual, but not impossible. Normally, I'd guess you'd run out of memory, but your project isn't that big. Another possibility is that we have different type definitions. In particular, you might have some bad ones for 3.7. There's a cache you might try clearing: can you close your editors and rename |
No, i waited 10 min and the loading... keep there. If i try completing any other thing it just shows the loading... indicator and no more trace is added to log Below is another trace. Took at 23h
|
With that, loading is instantaneous thanks |
@blikblum I don't suppose you feel like zipping up the package.json and package-lock.json files from your backup of the old cache so I can test things out locally? You can double check, but I don't believe it contains anything specific to you - just packages from the |
I can do, but i am travelling. Only in a few days. |
Sounds good. Ping me when you're ready. |
Sent by mail Mail not worked. Here it is |
Thanks! I kept digging through my junk folder without seeing any obvious matches before I noticed you had updated your comment. 😄 |
@blikblum Is that the old package-lock.json that was causing you problems or the new one that solved them? When I try the completion you suggested ( |
The old one, that was causing problems. For your info after some time with the cleared cache the slowdown got back. When using 3.8 working fine until now |
Interesting, I wasn't expecting anything to happen in the background since the cache was pre-populated (i.e. I manually ran |
I gave it more time and still had no luck. I also tried locking the package.json file, since that seems to be what the language service was trying to access at the end of your log. I'm kind of grasping at straws here: are any of your files symlinks or on network shares? That can cause behavior changes that wouldn't be reflected in my local testing. |
No. BTW: at the time i consider resolved by using typescript 3.8, not sure, if worth pursuing a backport fix |
My concern was that there would be a flood of incoming reports of this problem, but that doesn't seem to have happened. I'm fine saying we've investigated as much as we need to. Thanks for your help! |
Thanks for you looking into it |
Update: this looks very much like a duplicate of #35733. |
TypeScript Version: 3.7.3
Search terms:
I can reproduce with the following steps (Windows 10 - vscode 1.41 system setup)
import 'sup|'
(Ctrl +Space) -> cpu usage will peak and remain high with a Loading indicatorimport 'superagent'
Ctrl + Click on 'superagent' -> high cpu usage for long timeI downgraded to 1.40.2 and the above commands are instantaneous without cpu usage peaks
Originally posted by @blikblum in https://github.com/microsoft/vscode/issues/87032#issuecomment-566287989
The text was updated successfully, but these errors were encountered: