-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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
VS Code hangs when update dependencies #12042
Comments
@michaeljota does this produce a top level node_modules folder? can you share your settings? |
I notice this with top level node_modules only. Have not tried with any other. What settings do you need? I don't have settings changed from the editor, just few extensions. I got Sync Settings, I can give you the gist url, but it's just the list of extensions. |
I am wondering if this is file event related and you changed the built in |
It happens to me with differents projects, not just one. |
@michaeljota can you share your user settings and workspace settings or at least see if you once configured this setting |
I don't have any user settings not workspace settings. I have not configured You can see my settings here |
@michaeljota does this reproduce with any kind of npm install? I am wondering if the amount of modules getting installed has an impact. E.g. can we try with a small package.json that maybe only has one dependency to see if it reproduces? |
With this files hangs {
"name": "angular2",
"version": "0.0.1",
"dependencies": {
"@angular/common": "2.0.0-rc.7",
"@angular/compiler": "2.0.0-rc.7",
"@angular/core": "2.0.0-rc.7",
"@angular/forms": "2.0.0-rc.7",
"@angular/http": "2.0.0-rc.7",
"@angular/platform-browser": "2.0.0-rc.7",
"@angular/platform-browser-dynamic": "2.0.0-rc.7",
"@angular/router": "3.0.0-rc.3",
"core-js": "^2.4.1",
"rxjs": "5.0.0-beta.12",
"zone.js": "^0.6.21"
}
} Let me try something smaller. EDIT: {
"name": "angular2-desktop",
"version": "0.0.1",
"dependencies": {
"@angular/common": "2.0.0-rc.7",
"@angular/compiler": "2.0.0-rc.7",
"@angular/core": "2.0.0-rc.7"
}
} Neverless, they are random package. But, I reproduce the problem with the first one. |
@michaeljota |
@fibric can you hover over the processes in process explorer to find out their command line arguments? this would help finding out which process is hogging CPU |
@bpasero sorry, it took me a while; I have no Windows machine at home. With the Insiders update from today, I don't see the alien process anymore. |
@michaeljota you still there? @fibric in those screenshots I am not seeing a process with high CPU though? you say you cannot reproduce in insiders? |
Oh well, I forgot about it. |
@bpasero I'm here, but I don't know what program is that. Witch you would recommend me? |
@michaeljota a tool to see the full command line arguments of the processes (https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx?f=255&MSPPError=-2147217396). it would allow us to find the process that consumes so much CPU for you. |
I have only two processes which steal a lot of CPU time while running In the user preferences, I found a search option {
...,
// Configure glob patterns of file paths to exclude from file watching. Changing this setting requires a restart. When you experience Code consuming lots of CPU time on startup, you can exclude large folders to reduce the initial load.
"files.watcherExclude": {
"**/.git/objects/**": true
},
...,
// Configure glob patterns for excluding files and folders in searches. Inherits all glob patterns from the files.exclude setting.
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true
},
...
} I added |
@fibric yes you definitely want to have node_modules in the excludes and they are by default (maybe you configured it once when it was not yet): "files.watcherExclude": {
"**/.git/objects/**": true,
"**/node_modules/**": true
} |
@fibric sorry you are right, we only exclude it on Mac and Linux where our file watcher is not very efficient for large folders. We do not have seen this issue on Windows yet. |
@michaeljota On Windows a tool like Process Explorer helps: Once you have the information please update this issue with it. Thanks! |
Sorry, for forking. I was in a hurry. I apologize. |
@fibric ok, now you are forking this issue into something else I think because this originally was about hang when running "npm install". please create a new issue for your CPU issue when opening a large file. |
OK. Just tried to I tried in two different projects, and neither reproduce the issue. |
OK please report back then if it happens again. However since this seems to happen sporadically, it seems like an indeterministic issue. |
Sure. Thanks! Sorry for the delay. |
@bpasero I'm sorry, but I'm having this same issue with lastes stable Code (1.7.1). You can run The screens from User config: // Coloque su configuración en este archivo para sobrescribir la configuración predeterminada.
{
"editor.fontFamily": "Hasklig, Consolas, 'Courier New', monospace"
} Workspace config: {
"typescript.tsdk": "node_modules/typescript/lib/",
"auto-close-tag.activationOnLanguage": [
"html"
],
"typescriptHero.resolver.multiLineWrapThreshold": 100
} Extensions: (Installed. Recommended in workspace as well) {
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
"abusaidm.html-snippets",
"christian-kohler.path-intellisense",
"EditorConfig.EditorConfig",
"eg2.tslint",
"formulahendry.auto-close-tag",
"formulahendry.auto-rename-tag",
"joelday.docthis",
"johnpapa.Angular2",
"msjsdiag.debugger-for-chrome",
"natewallace.angular2-inline",
"rbbit.typescript-hero"
]
} |
If you need anything else, I'll try to help you. This issue is really edge, but with this configuration for some reason keeps happing. I work with that seed in my projects, and in everyone of them it's the same. I have to close VSCode when I'm going to install. |
@michaeljota |
@bpasero it is still reproducible. |
@michaeljota I tried to reproduce and could not. in your screen shots I am also not seeing a CPU spending high cycles in some task, how does the lag show to you then? does VS Code freeze? Also can you share your settings with me? |
I already share them, settings and extension set, just after my set of pictures. The VSCode freeze and ask for reload. The CPU usage does not get high, it just "stop responding". |
@bpasero Hi! I reproduce this with another, and smaller, project. Steps:
{
"name": "graphql-postgres",
"version": "1.0.0",
"description": "An example GraphQL server using a PostgreSQL DB",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"tsc": "tsc"
},
"author": "Michael De Abreu",
"license": "MIT",
"dependencies": {
"express": "^4.14.0",
"express-graphql": "^0.6.1",
"faker": "^3.1.0",
"graphiql": "^0.8.1",
"graphql": "^0.8.2",
"pg": "^6.1.2",
"pg-hstore": "^2.3.2",
"sequelize": "^3.29.0",
"ts-node": "^2.0.0",
"typescript": "^2.1.5"
},
"devDependencies": {
"@types/express": "^4.0.35",
"@types/express-graphql": "0.0.33",
"@types/faker": "^3.1.32",
"@types/graphql": "^0.8.6",
"@types/node": "^6.0.60",
"@types/pg": "^6.1.34",
"@types/sequelize": "^4.0.39",
"nodemon": "^1.11.0",
"react": "^15.4.2",
"react-dom": "^15.4.2"
}
}
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"noEmitHelpers": true,
"strictNullChecks": false,
"baseUrl": "./src",
"paths": {
},
"lib": [
"dom",
"es6",
"es2017"
],
"noUnusedParameters": true,
"noUnusedLocals": true,
"noImplicitReturns": true
}
} User // Coloque su configuración en este archivo para sobrescribir la configuración predeterminada.
{
"editor.fontFamily": "Hasklig, Consolas, 'Courier New', monospace",
} Workspace {
"typescript.tsdk": "./node_modules/typescript/lib"
} Extensions
It's literally a five files project. |
@michaeljota I wonder if this issue is being caused by an installed extension. Can you try to run VS Code without extensions? From the command line (NOT the integrated terminal in Code), execute: |
@michaeljota is this still happening with our latest insider build? You can give our preview releases a try from: http://code.visualstudio.com/Download#insiders |
I see what you did there. I'll test it and report. 👍 |
Let's merge into #3998 |
Steps to Reproduce:
npm install
in a (external) terminal.VS Code stop responding. I ran it with the integrated terminal and an external one with the same results.
Edit typo.
The text was updated successfully, but these errors were encountered: