Visual Studio 2017 - Node.JS Server Process - Turn off?

前端 未结 9 1566
被撕碎了的回忆
被撕碎了的回忆 2020-12-12 10:33

I\'m working on a ASP.NET App in Visual Studio 2017 and I\'m noticing a Node.JS: Server-side Javascript process running at 1.3GB to 1.8GB of memory. My IIS worker process is

相关标签:
9条回答
  • 2020-12-12 11:01

    Something that can help the projects mitigate the nodejs weight: is to reassign the node version used under Tools > Options > Projects and Solutions > Web Package Management to an installed 64bit version. Studio will still launch its internal Node for a tsserver.js instance, but any typescript in project will default to the supplied version -- and this helped me firsthand.

    Also, another time I found the language service to be running down, I discovered using a simple tsconfig.json above the directories used as repositories, and specify to skipLibCheck: true, and add node_modules to exclude -- tremendously helped along the service, and one file does all folders beneath it, regardless of direct project references. P.S. -- if you do want JavaScript intellisense support still, make sure to set the allowJs: true and noEmit: true option.

    Lastly, verify in the Typescript Options under the Tools > Options > Text Editor > Javascript/Typescript > Project that it is not checked to Automatically compile Typescript files which are not part of a project since that can also tie up resources for auxillary 3rd party projects using node or typescript.

    These are not fool-proof, each has to find their exact bottleneck, but I have found these have worked for me and my team more often than not

    0 讨论(0)
  • 2020-12-12 11:01

    In my case I did bot wanted to kill node.js process and I did following things to lower the CPU consumption ov Node.Js processes that run under Visual Studio 2019:

    • I removed folder "Program Files (x86)/MicrosoftSDK/TypeScript
    • I run npm rebuild fsevents
    • I turned off in Chrome browser: Settings-System-Continue running background apps ...

    It seems to me much better now. But not 100% unfortunatelly.

    Hope this helps someone out there too. Good luck guys! :-)

    0 讨论(0)
  • 2020-12-12 11:03

    I raised feedback on this issue:

    https://developercommunity.visualstudio.com/content/problem/31406/visual-studio-2017-nodejs-server-process-turn-off.html

    I got response back from a MS Team - he directed me to this post:

    https://developercommunity.visualstudio.com/content/problem/27033/nodejs-server-side-javascript-process-consuming-to.html?childToView=27629#comment-27629

    The node.exe process has the command line:

    Effectively I was told:

    In VS 2017, several features are implemented in JavaScript. Node.js is used by Visual Studio to run that JavaScript. Among other things, Node is used to run the code that provides formatting and intellisense services when a user is editing TypeScript or JavaScript. This is a change from VS 2015.

    It answers my question, but brings to light another - why do you need 1.4GB of memory to give me intellisense on JavaScript files ... or is this one of the solutions that has been built into VS so it uses Less Memory so it doesn't hit the 2GB(4GB) limit of 32-bit processes? Questions questions questions.

    0 讨论(0)
提交回复
热议问题