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

Newest version 1.33.1 has electron_node tsserver.js eating up 100% cpu randomly #31341

Closed
danboyle8637 opened this issue May 7, 2019 · 12 comments · Fixed by #31354
Closed

Newest version 1.33.1 has electron_node tsserver.js eating up 100% cpu randomly #31341

danboyle8637 opened this issue May 7, 2019 · 12 comments · Fixed by #31354
Labels
Fixed A PR has been merged for this issue

Comments

@danboyle8637
Copy link

So this seems to be a recurring issue over the years. But there also appears to be no definitive solution either.

Here's what my process manager is showing:
Screen Shot 2019-04-19 at 11 14 04 AM

Not entirely sure why. I'm not coding in Typescript... I'm not using any clear extension that's typescript related... unless ESLint does this, which I wouldnt be surprised about.

I have reverted back to version 1.32 and everything runs like a dream.

Intellisense is FAST.
No code highlighting issues.

I just wanted to bring this back up.

I'm working on a tight deadline for two sites so once I get these done I will try to get my tslog info... but in the meantime I wanted to see if anybody else has experienced this and found a solution that I have not come across yet.

Thanks!

@vscodebot vscodebot bot assigned mjbvz May 7, 2019
@mjbvz
Copy link
Contributor

mjbvz commented May 7, 2019

Can you please share some more information about the project, such as the list of dependencies in the package.json

@danboyle8637
Copy link
Author

Hey @mjbvz here's my dependencies...

Screen Shot 2019-05-07 at 8 20 53 PM

It's a gatsby site and nothing special. At this point, it's a plain static site... though that will change in future iterations and updates.

Maybe prettier?

@mjbvz
Copy link
Contributor

mjbvz commented May 8, 2019

Can you please share that as text instead

@danboyle8637
Copy link
Author

@mjbvz Here you go... thanks!

"dependencies": {
    "babel-plugin-styled-components": "^1.10.0",
    "gatsby": "^2.3.34",
    "gatsby-image": "^2.0.41",
    "gatsby-plugin-google-tagmanager": "^2.0.13",
    "gatsby-plugin-manifest": "^2.0.29",
    "gatsby-plugin-react-helmet": "^3.0.12",
    "gatsby-plugin-remove-serviceworker": "^1.0.0",
    "gatsby-plugin-sharp": "^2.0.35",
    "gatsby-plugin-styled-components": "^3.0.7",
    "gatsby-plugin-transition-link": "^1.12.3",
    "gatsby-plugin-typography": "^2.2.13",
    "gatsby-source-filesystem": "^2.0.33",
    "gatsby-source-graphql": "^2.0.18",
    "gatsby-transformer-remark": "^2.3.12",
    "gatsby-transformer-sharp": "^2.1.18",
    "gsap": "^2.1.2",
    "prop-types": "^15.7.2",
    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "react-helmet": "^5.2.0",
    "react-transition-group": "^2.9.0",
    "react-typography": "^0.16.19",
    "styled-components": "^4.2.0",
    "typeface-montserrat": "0.0.54",
    "typeface-quicksand": "0.0.71",
    "typography": "^0.16.19"
  },
  "keywords": [
    "gatsby"
  ],
  "license": "MIT",
  "scripts": {
    "build": "gatsby build",
    "develop": "gatsby develop",
    "start": "npm run develop",
    "format": "prettier --write \"src/**/*.js\"",
    "test": "echo \"Write tests! -> https://gatsby.app/unit-testing\""
  },
  "devDependencies": {
    "prettier": "^1.17.0"
  },

@mjbvz
Copy link
Contributor

mjbvz commented May 9, 2019

Thanks. I tested this but can't repo the perf issue using VS Code insiders on a new gatsby site with those dependencies. Sometimes the memory usage would climb but it drops back down once garbage collection kicks in

Can you please test this on VS Code insiders. If you can share the logs or the project itself, I can also investigate this better

@AasmundEndresen
Copy link

@mjbvz I've been having the same issue on my projects ever since upgrading to 1.33.0 and have been crawling through answers looking for a solution. There seems to be ALOT of people experiencing this and closing or tagging all of them with needs more info is not very helpful, and makes it extremely hard to look for useful information.

If this issue is tracked somewhere could you please either link where it's tracked, or stop closing all the issues?

It's not very good that the only solution I've found so far is having to disable TypeScript/Javascript Features which essentially disables Intellisense too...

@danboyle8637
Copy link
Author

@mjbvz My code is public on my profile. It's the thistimefitness repo.

I did test the insiders and still got the same problem. I looked at my logs but there wasn't much there.

To make sure I was grabbing the right logs, I used the quick navigation... typed logs... and looked at main logs.

But there was nothing going on there.

Are there other logs I should be looking at?

@mjbvz mjbvz transferred this issue from microsoft/vscode May 10, 2019
@mjbvz mjbvz removed their assignment May 10, 2019
@mjbvz
Copy link
Contributor

mjbvz commented May 10, 2019

Thanks. I could repo some sluggish performance with the following steps:

  1. git clone https://github.com/danboyle8637/thistimefitness.git
    cd thistimefitness
    npm i
    
  2. Open folder in vscode and go to CallToActionSection.js

This looks like the same issue as #31302 since I usually see the poor performance in files that reference styled-components

@danboyle8637
Copy link
Author

Just curious... why would version 1.32.3 be so fast with styled-components?

Do you recommend something else like Emotion?

@mjbvz
Copy link
Contributor

mjbvz commented May 10, 2019

See #30819 for details about the root cause. You can change the TS version used in VSCode by following these instructions

@ahejlsberg
Copy link
Member

Best I can tell this is fixed by #31354. I tried the setup described above with #31354, and other than 10-15 seconds of CPU activity right after opening the folder, I'm not seeing much CPU load and statement completion is pretty much instantaneous.

@John-Yue
Copy link

快被这个问题折磨疯了!!!
从网上看有3中方法,

  1. 设置files.exclude 和files.watcherExclude,关于内容你们肯定都看过。
  2. rm -r /home/(user name)/Library/Cache/typescript/* 这个我试了一下,时灵时不灵
  3. disable TypeScript/Javascript Features,这是最管用的...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed A PR has been merged for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants