Skip to content
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

electron_node tsserver.js - running at 100% #72631

Closed
LeeCampbellr opened this issue Apr 20, 2019 · 10 comments
Closed

electron_node tsserver.js - running at 100% #72631

LeeCampbellr opened this issue Apr 20, 2019 · 10 comments
Assignees
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues info-needed Issue requires more information from poster javascript JavaScript support issues

Comments

@LeeCampbellr
Copy link

Issue Type: Bug

Running a gatsby project with the base styled-components installed - tried the clearing of the typescript version cache. tsserve processr is running at 100% anytime I edit any file with styled-components. I'm running the insiders edition with no extension active.

VS Code version: Code - Insiders 1.34.0-insider (f89390f, 2019-04-18T13:31:41.962Z)
OS version: Darwin x64 18.5.0

System Info
Item Value
CPUs Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz (12 x 2900)
GPU Status 2d_canvas: enabled
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
Load (avg) 3, 2, 2
Memory (System) 32.00GB (10.94GB free)
Process Argv -psn_0_3789725
Screen Reader no
VM 0%
Extensions (1)
Extension Author (truncated) Version
material-icon-theme PKi 3.7.0

(1 theme extensions excluded)

@vscodebot vscodebot bot added the terminal Integrated terminal issues label Apr 20, 2019
@Tyriar Tyriar assigned mjbvz and unassigned Tyriar Apr 20, 2019
@Tyriar Tyriar removed the terminal Integrated terminal issues label Apr 20, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented Apr 22, 2019

Do you have @types/styled-components installed under node_modules? If so, what version?

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Apr 22, 2019
@LeeCampbellr
Copy link
Author

I do not have @types/styled in the project.

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 22, 2019

Sorry, should be @types/styled-components. I updated my comment for this.

Also, can you please try collecting the TS Server log to help us investigate:

  1. Set "typescript.tsserver.log": "verbose",
  2. Restart VS Code and reproduce the problem
  3. In VS Code, run the TypeScript: Open TS Server log command
  4. This should open a tsserver.log file in the editor

If you can share that log, I can take a look to see if anything stands out

⚠️Warning: The TypeScript log may include information from your workspace, including file paths and source code. If you have any concerns about posting this publicly on Github, just let me know and we can arrange something else. On our side, we only use these logs to investigate issues like this

@LeeCampbellr
Copy link
Author

I do not have @types/styled-components in the project.

I've attached a TS Server log following your steps - let me know if there's anything else I can help to resolve.

tsserver.log

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 23, 2019

Thanks. I don't see anything in the logs that indicates a long running request or expensive ongoing operation. Was the high cpu usage happening when you collected the log? How long does the spike last?

One idea: can you try creating a jsconfig.json at the root of your project. This file explicitly defines a javascript project and may prevent a few js files under node_modules from being included

@LeeCampbellr
Copy link
Author

It was happening - if I do any typing in the code editor with a Gatsby project open it goes nuts, especially copy and pasting sections of code around - but the second I stop typing the CPU drops back down.

I created a jsconfig.json at the root of the project this morning and it did not help.

@fortydegrees
Copy link

FWIW, I also encounter this issue with a similar setup

@mjbvz
Copy link
Collaborator

mjbvz commented May 22, 2019

@LeeCampbellr Can you also please test this again using the latest VS Code insiders build (which includes TypeScript 3.5)

I believe you could have been hitting microsoft/TypeScript#30819 which should now be fixed

@mjbvz mjbvz added freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues javascript JavaScript support issues labels May 22, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented May 29, 2019

Closing this as a likely duplicate of microsoft/TypeScript#30819 based on the repo

@mjbvz mjbvz closed this as completed May 29, 2019
@leolozes
Copy link

leolozes commented May 29, 2019

I'm consistently getting a 25%-40% CPU usage from electron_node tsserver.js, both on the last stable and last exploration build, with no extensions. Also, between 600 and 1.200 MB of RAM usage:

ProcessExplorer

I don't have @types/styled-components installed under node_modules, however I do have @types/styled-jsx@^2.2.8, I don't know if it can impact as well.

At the time I took the screenshot I had the ESLint extension enabled. I tried without it and it doesn't seem to have an impact.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues info-needed Issue requires more information from poster javascript JavaScript support issues
Projects
None yet
Development

No branches or pull requests

5 participants