This project is read-only.

Known performance problem with a large number of dependencies?

Oct 29, 2014 at 5:10 PM

I've been trying the NTVS builds out for a while now and it seems to me that for projects with a large'ish package.json (e.g. 25 dependencies, 20 devDependencies) sends VS 2013 into a spin with continual high CPU and memory usage. Are you aware of this being a problem? I assume you are, but there's no 'Issue' which jumps out at me.

I really want this plug-in to be a success and would love to provide you with information to help your development.

Oct 29, 2014 at 5:32 PM
I'm sorry to hear you are running into this issue. Can you specify which build of NTVS you are using. Can you provide us your package.json (you can remove sensitive information)?
Oct 29, 2014 at 7:32 PM
Sure, here you go Rick.

Visual Studio 2013 Update 3
Install Node Tools from: NTVS Dev 2014-10-17 VS 2013.msi

First of all the tooling seems to have a problem parsing the package.json, which I think I can make go away if I remove the devDependencies, save the file, and put them back in. Or maybe it was when I auto-formatted the .json file (using CTRL+K+D). Something odd going on there but I recall seeing another issue logged for this.

Anyway, I've performed a 'npm install' from the command line and then re-opened the solution. The CPU burns along for quite a while and the memory usage (private working set - as reported by Task Manager) sits at 2.1GB. Hitting Ctrl + F5 to launch without debugging raises the memory usage by several hundred MB and burns 2 CPU cores for a little while (1 minute?) before my console.log flashes up.

Also note that Node.js IntelliSense is set to 'Quick' rather than 'Full'.

Aside from package.json, the solution only contains index.js with a single console.log() statement. The package.json contents are as follows (with a few packages removed for 1 reason or another):

"name": "some-app",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
    "start": "node index.js"
"author": "",
"license": "ISC",
"dependencies": {
    "azure": "0.6.9-zumo",
    "body-parser": "^1.6.3",
    "connect-flash": "*",
    "cookie-parser": "^1.3.2",
    "cookie-session": "^1.0.2",
    "express": "^4.8.3",
    "jquery": "^2.1.1",
    "lodash": "^2.4.1",
    "lusca": "^1.0.1",
    "morgan": "^1.2.2",
    "nconf": "^0.6.9",
    "passport": "^0.2.0",
    "passport-http": "^0.2.2",
    "passport-local": "^1.0.0",
    "path": "^0.4.9",
    "q": "^1.0.1",
    "string": "^2.1.0",
    "serve-favicon": "2.0.1",
    "shortid": "^2.0.1",
    "underscore": "^1.7.0"
"devDependencies": {
    "assert": "^1.1.1",
    "bower": "^1.3.9",
    "cucumber": "^0.4.2",
    "gulp": "^3.8.7",
    "gulp-clean": "^0.3.1",
    "gulp-if": "^1.2.4",
    "gulp-jshint": "^1.8.4",
    "gulp-minify-css": "^0.3.7",
    "gulp-mocha": "^0.5.2",
    "gulp-nodemon": "^1.0.4",
    "gulp-shell": "^0.2.9",
    "gulp-uglify": "^0.3.1",
    "jshint-stylish": "^0.4.0",
    "mocha": "^1.21.4",
    "mocha-tap-reporter": "^0.1.2",
    "requestify": "^0.1.16",
    "webdriverio": "^2.2.0",
    "streamqueue": "^0.1.1",
    "gulp-angular-injector": "^1.0.0",
    "gulp-uglify": "^1.0.1",
    "gulp-browserify": "^0.5.0",
    "gulp-util": "^3.0.1",
    "gulp-concat": "^2.4.1",
    "gulp-html-minifier": "^0.1.5",
    "gulp-minify-css": "^0.3.10",
    "gulp-html-replace": "^1.3.0"
Oct 29, 2014 at 10:48 PM
Thank you for providing this. I was able to reproduce the issue you specified. In the build you are using, VS tries really hard to process the invalid JSON. In our latest build we handle this better. The performance is much better. We should have a new build coming out shortly with the most recent code changes.

More details on the error,
The error is in the JSON file. There are multiple entries for the same package under "devDependencies". If you remove the duplicate packages then the package.json loads successfully.

gulp-uglify": "^1.0.1",
"gulp-minify-css": "^0.3.10",
Marked as answer by andrewbryson on 10/30/2014 at 3:57 AM
Oct 30, 2014 at 11:55 AM
Thanks for the update Rick, looking forward to the next build!

And thank you for pointing out the duplicated dependencies, I've had that tidied up.
Nov 12, 2014 at 7:36 PM
Thanks, Andrew, for validating that there's still some performance issues. I was having the same problem with my large node project. I had to turn off intellisense to reduce the a memory leak that was causing vs to slow way down and eventually crash. It did seem to fix the problem for the most part, but without having intellisense and similar features that an IDE offers, I still feel it's best for me to use a text editor like Sublime Text. I will hold off trying beta 3 and wait to see what performance fixes are in the next release.
Nov 12, 2014 at 7:43 PM
We're sorry to hear of your performance issues. We are testing with some large projects internally. We are not however seeing crashes from analysis. Are there anymore details to reproduce this crash? List of packages, number of files in project, actions you were doing at time of crash, etc...
Nov 13, 2014 at 9:24 PM
The number for the issue I submitted is 1248. I just found it and the status is set to 'Resolved'. I am going to try out Beta 3.