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

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

    The dirtiest workaround ever: just rename the ServiceHub.Host.Node.x86.exe to something else. Hasn't bothered me since. When (if) you actually need it, just rename it back.

    Same trick works in Adobe Photoshop which also runs Node for some reason I haven't discovered in my usual workflow yet.


    Turns out...

    You can't just rename it and expect things to keep working. Who knew!

    Apparently this renaming trick only works if you suspend VS process and kill Node, then resume VS. If you try to launch VS with Node exe file renamed, it will crash when opening a project with an "unknown hard error". Also, while working on an already loaded project, the lazy reference counter above methods and properties won't work because apparently that relies on Node being there somehow.

    So it might be okay to just suspend the Node process and let Windows paging swap its memory out from ram onto the hard drive, without renaming the exe so you could start the VS again later without going through the renaming hassle. If you're willing to live with the consequences, that is.

提交回复
热议问题