Angular: Running ngcc causing performance issues in VSCode
Asked Answered
L

2

16

In my Visual Studio Code editor after last updates I see this text in the status bar:

enter image description here

Angular: Running ngcc for project d:/..../tsconfig.spec.json

It looks like frozen or do nothing a while, just spin the arrows.

Before this text I saw a similar one with tscfonfig.json ending...

Since this text is showing in the status my vscode has some performance issues... it became very-very slow. Sometimes, very often the quick import (ctrl-space) isn't work, not found classes, interfaces what before this update worked well.

What is this? Is it neccessary or can I switch off somehow? Is this maybe a plugin bug?

Lafontaine answered 19/2, 2021 at 13:42 Comment(7)
Having the same problem, I dont think this is caused due to extensions, but rather because of a solution style tsconfig..Haughty
Is this related to VSCode or do you encounter this issues in your terminal, too? There was a time when transpiling on Windows was unbelievable slow. It was faster to boot a Linux in VirtualBox and transpile on Linux. It could be related to that.Ireful
Related to VSCode. Other applications on Windows running well. Otherwise the ng build --watch is running well too. Only in the VSCode happening something wierd...Lafontaine
Same here, makes VSCode unusable with quite a large angular repo. Had to switch IDEs to maintain my sanityDraftee
I'm having the same trouble: VSCode: 1.53.2 Angular Language Service: 11.2.2 "@angular-devkit/architect": ">= 0.900 < 0.1100", "@angular-devkit/build-angular": "^0.1100.2", "@angular/cli": "~10.1.0", "@angular/compiler-cli": "~10.1.0",Cavill
In my case it was the new experimental-ivy feature from Angular Language Service extension. I posted an answer on how to disable it.Bench
Update the Angular Language Service Extension to V11.2.3. They have resolved the performance issue now. See here: github.com/angular/vscode-ng-language-service/releases/tag/…Simmie
B
15

EDIT: They improved performance in Angular Language Service v11.2.3 release. In this version (or higher), you can re-enable Experimental-ivy feature, it's still slower but not as before, now at least it's usable (they said there is room for improvement).


If it got slow again, it's likely a known issue with the new Experimental-ivy feature from the Angular Language Service, they are working on a fix.

For now, you can temporarily disable it by opening the extension settings:

Manage Extensions UI

Then uncheck the Experimental-ivy feature:

Disable ivy

Bench answered 23/2, 2021 at 4:28 Comment(0)
S
9

I had the same issue. I had to turn off FullTemplateTypeCheck in the Angular Compiler Options.

Note: this issue has been resolved in version V11.2.3 of the Angular Language Service VS Code extension.

If you want to disable fullTemplateTypeCheck:

In your tsconfig.json file set "fullTemplateTypeCheck" to false and restart VS Code.

fullTemplateTypeCheck is in the angularCompilerOptions object in your tsconfig.json file.

Here is mine:

  "angularCompilerOptions": {
    "enableIvy": true,
    "fullTemplateTypeCheck": false    
  }

Update

If you upgrade the Angular Language Service VS Code Extension to V11.2.3. It looks like this problem has been resolved. See here.

I updated the extension to V11.2.3 and I have re-enabled fullTemplateTypeCheck and I can confirm it is working as expected.

Simmie answered 21/2, 2021 at 23:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.