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

前端 未结 9 1579
被撕碎了的回忆
被撕碎了的回忆 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

提交回复
热议问题