question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

0.1.7 High CPU usage and memory usage increasing (windows 10)

See original GitHub issue

Hi,

I’m using the latest 0.1.7 version in my angular project and notice slow vscode performance and Intellisense slowness or even not working. When I check the Windows Task Manager I see vscode consuming 50% to 60% CPU. The Angular Language Service OUTPUT window keeps logging the following two errors continuously:

Config file name: c:/Code/Git/xms/tsconfig.json
Angular Language Service: 5.0.0-beta.5
TypeScript: 2.4.2
Error for getTemplateRefrences:
    Error: PopupComponent cannot be used as an entry component.
    at syntaxError (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:253:17)
    at CompileMetadataResolver._getEntryComponentMetadata (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:9258:19)
    at C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:8915:53
    at Array.map (native)
    at CompileMetadataResolver.getNgModuleMetadata (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:8915:18)
    at CompileMetadataResolver.getNgModuleSummary (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:8773:35)
    at C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:8837:55
    at Array.forEach (native)
    at CompileMetadataResolver.getNgModuleMetadata (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:8822:49)
    at CompileMetadataResolver.getNgModuleSummary (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules\@angular\language-service\bundles\language-service.umd.js:8773:35)
getTemplateRefrences: 5883ms
SERVER ERROR: Cannot read property 'length' of null
TypeError: Cannot read property 'length' of null
    at Project.updateFileMap (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\editorServices.js:797:94)
    at Project.updateGraph (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\editorServices.js:815:14)
    at Project.finishGraph (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\editorServices.js:807:14)
    at ProjectService.openConfigFile (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\editorServices.js:1634:17)
    at ProjectService.openOrUpdateConfiguredProjectForFile (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\editorServices.js:1486:41)
    at ProjectService.openClientFile (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\editorServices.js:1404:23)
    at C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\documents.js:135:47
    at TextDocuments.logErrors (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\documents.js:235:13)
    at C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\documents.js:131:74
    at handleNotification (C:\Users\Maarten\.vscode\extensions\Angular.ng-template-0.1.7\server\node_modules\vscode-jsonrpc\lib\main.js:353:21)
[Error - 13:38:00] Notification handler 'textDocument/didOpen' failed with message: Cannot read property 'length' of null

Everytime when the errors are logged, the memory usage of vscode increases. Within a few minutes, my vscode instance consumes more than 2GB memory. When I disable the extension, the problem doesn’t occur.

My project uses the 4.4.2 version of the @angular/* packages. I updated my local “@angular/language-service” version to the mentioned “^5.0.0-beta.5” version and TypeScript to version “2.4.2”. No luck either. The errors keep occurring.

Any help is appreciated.

Kind regards,

Maarten

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
chuckjazcommented, Jan 3, 2018

I understand that it is easy but given that I have 60+ bugs to look at in this repository as well as 100+ in angular/angular, it would help if I just had to clone a repository.

Almost every bug reported is simple for the reporter to reproduce and usually involves some simple steps that I can easily do myself but when I try to reproduce it I can’t because some critical step is missing which is obvious to the reporter but not to me. This is why we ask for a plunker in angular/angular and I ask for a repository here.

A repository that reproduces the issue avoids all the “oh I forgot to tell you, you also need to do x” issues. This allows the steps to be as simple as clone X, “npm install” start VS Code in the directory, try to do Y in file Z.

1reaction
cmeyertonscommented, Jul 10, 2018

@chuckjaz this is still a big issue, I’ve uninstalled the plugin completely (tried 1.0.6 as well with no luck). you can find my repro repo here: https://github.com/cmeyertons/174_vscode_ng_language_service_repro

This is just a git pull of the Angular Tour of Heroes tutorial so it should be pretty standard (maybe i didn’t need a separate repo)

Steps to reproduce:

  1. open repo & npm i
  2. go to heroes.component.ts and line 71
  3. wait for typescript to initialize and hover over this.selectedhero.id
  4. erase .id and save the file, retype .id, hover and it will briefly (~1s) show a loading indicator. On larger projects this indicator can take from 5-10 s. w/o the extension, there is no loading indicator on hover.
  5. rinse & repeat step 4 and watch VS code’s memory climb (mine went from 250 -> 500 MB pretty quickly)

I did this on VS code 1.24.1 w/ all extensions disabled except Angular Language Service (0.1.9).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows 10 High Memory Usage [Causes and Solutions]
How to Fix Windows 10 High Memory Usage · Fix 1: Close unnecessary programs · Fix 2: Disable startup programs · Fix 3:...
Read more >
How to Fix High RAM and CPU Usage in Windows 10
The problem of High RAM and CPU usage in Windows 10 can be fixed by disabling Runtime Broker, changing Memory Management System and...
Read more >
system and compressed memory high CPU usage
So lately i've been having problems with a process called "system and compressed memory". It uses over 1gb of ram, which is unacceptable....
Read more >
Fix High RAM Memory Usage Issue on Windows 11/10 [10 ...
Try the following steps to define if your computer is with high memory usage, high CPU, or high disk usage error: Step 1....
Read more >
Windows 10, 'System' process taking massive amounts of RAM
I've asked Microsoft about it and the answer is that this is by design. It is related to System Memory compression. In the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found