Skip to content
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

Excessive CPU, Memory, and Energy Use When Salesforce Extension Pack is Enabled #1592

Closed
jeramy-dichiera opened this issue Aug 26, 2019 · 14 comments

Comments

@jeramy-dichiera
Copy link

jeramy-dichiera commented Aug 26, 2019

Summary

When the Salesforce Extension Pack is enabled I am experiencing greatly increased CPU, memory, and energy use. Currently Visual Studio Code 'Code Helper' is using 214% CPU, 303 energy impact, and 1.86 GB memory.

Please let me know if there is any specific information I can supply.

Steps To Reproduce:

  1. Open a code base in Visual Studio Code with Salesforce Extension Pack enabled.
  2. Open Activity Monitor
  • Note that Visual Studio Code Code Helper is using excessive resources.

Expected result

When using the Salesforce Extension Pack, Visual Studio Code consumes less resources and can be used on battery power.

Actual result

When using the Visual Studio Code Extension Pack, Visual Studio Code appears to use excessive resources and needs to be disabled in order to retain battery life.

Additional information

Feel free to attach a screenshot.

VS Code Version:

Version: 1.37.1
Commit: f06011ac164ae4dc8e753a3fe7f9549844d15e35
Date: 2019-08-15T16:16:34.800Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 18.7.0

SFDX CLI Version:
sfdx-cli/7.20.1-d88ae4707c darwin-x64 node-v10.15.3

OS and version:
macOS Mojave 10.14.6

@jeramy-dichiera jeramy-dichiera changed the title Excessing CPU, Memory, and Energy Use When Salesforce Extension Pack is Enabled Excessive CPU, Memory, and Energy Use When Salesforce Extension Pack is Enabled Aug 26, 2019
@fageroosjaimePFG
Copy link

fageroosjaimePFG commented Aug 28, 2019

I am also experiencing this issue. VS Code with the Salesforce Extension Pack enabled is rendering my laptop useless as it is so bogged down at 100% CPU Usage.
Version: 1.37.1 (user setup)
Commit: f06011ac164ae4dc8e753a3fe7f9549844d15e35
Date: 2019-08-15T16:17:55.855Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.17763

My CPU usage goes down drastically if I disable the SF extensions. Please let me know if I can provide additional detail to help resolve this issue.

@adityababbar
Copy link

adityababbar commented Sep 5, 2019

This happens for me only when Indexing of Lightning Components occurs by Aura Component Extension. Only then my CPU utilization is 100% and PC is useless. It seems this indexing is a CPU hog.

image

@arneper
Copy link

arneper commented Dec 10, 2019

I also seem to be caught in the endless Indexing Lightning Components cycle. What information would be helpful fro me to provide? Thanks

@rapsacnz
Copy link

Here is a sample of the error output I get:

(node:2897) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. [Error - 6:48:55 AM] (node:2897) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined at Object.indexStaticResources (/Users/caspar/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-47.9.0/node_modules/lwc-language-server/lib/metadata-utils/static-resources-util.js:55:85) at async Promise.all (index 2) at async Promise.all (index 0) at async Timeout._onTimeout (/Users/caspar/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-47.9.0/node_modules/aura-language-server/lib/server.js:39:9) [Error - 6:48:55 AM] (node:2897) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) [Error - 6:48:55 AM] (node:2897) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@victorng8
Copy link

victorng8 commented Dec 11, 2019

I also got @rapsacnz 's error but no excessive CPU usage issue.

I do have other issues like no longer able to retrieve/deploy from/to target org (when right click Manifest folder -> Package.xml).

See more info here : #1840

@pogilvie
Copy link

pogilvie commented Dec 11, 2019

Me too. I've had the spinning 'Indexing Lightning Compoents' issue. I disabled the Aura component extension and it stoped. BTW I'm on OSX with all updates installed.

@ralphcallaway
Copy link

Ditto, I can hardly type vs code gets so slow with the Aura component extension on.

@danielenriquez
Copy link

Same problem with "Indexing Lightning Components"
Give me this errors when VSC start:
Error queuing up indexing of static resources. Error details: TypeError: Cannot read property '0' of undefined
at Object.indexStaticResources (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\lwc-language-server\lib\metadata-utils\static-resources-util.js:55:85)
at async Promise.all (index 2)
at async Promise.all (index 0)
at async Timeout._onTimeout (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\aura-language-server\lib\server.js:39:9)
Error queuing up indexing of content resources. Error details: TypeError: Cannot read property '0' of undefined
at Object.indexContentAssets (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\lwc-language-server\lib\metadata-utils\content-assets-util.js:56:83)
at async Promise.all (index 3)
at async Promise.all (index 0)
at async Timeout._onTimeout (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\aura-language-server\lib\server.js:39:9)
Error queuing up indexing of labels. Error details: TypeError: Cannot read property '0' of undefined
at Object.indexCustomLabels (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\lwc-language-server\lib\metadata-utils\custom-labels-util.js:51:82)
at async Promise.all (index 4)
at async Promise.all (index 0)
at async Timeout._onTimeout (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\aura-language-server\lib\server.js:39:9)
(node:17352) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
at Object.indexStaticResources (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\lwc-language-server\lib\metadata-utils\static-resources-util.js:55:85)
at async Promise.all (index 2)
at async Promise.all (index 0)
at async Timeout._onTimeout (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\aura-language-server\lib\server.js:39:9)
(node:17352) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
at Object.indexStaticResources (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\lwc-language-server\lib\metadata-utils\static-resources-util.js:55:85)
at async Promise.all (index 2)
at async Promise.all (index 0)
at async Timeout._onTimeout (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\aura-language-server\lib\server.js:39:9)
(node:17352) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:17352) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:17352) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:17352) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Loading support library: browser
Loading support library: ecmascript
[Info - 14:01:53] ... language server started in 769.02 ms
Error queuing up indexing of static resources. Error details:
Error queuing up indexing of content resources. Error details:
Error queuing up indexing of labels. Error details:
[Error - 14:01:53] (node:17352) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
at Object.indexStaticResources (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\lwc-language-server\lib\metadata-utils\static-resources-util.js:55:85)
at async Promise.all (index 2)
at async Promise.all (index 0)
at async Timeout._onTimeout (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\aura-language-server\lib\server.js:39:9)
[Error - 14:01:53] (node:17352) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
at Object.indexStaticResources (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\lwc-language-server\lib\metadata-utils\static-resources-util.js:55:85)
at async Promise.all (index 2)
at async Promise.all (index 0)
at async Timeout._onTimeout (c:\Users\user.name.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\aura-language-server\lib\server.js:39:9)
[Error - 14:01:53] (node:17352) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
[Error - 14:01:53] (node:17352) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
[Error - 14:01:53] (node:17352) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[Error - 14:01:53] (node:17352) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Indexed 11 files in 1627.75 ms ms
[Info - 14:01:55] Indexed 11 files in 1627.75 ms ms
loadCustomTagsFromFiles: processed 16 files in 610.98 ms
loadCustomTagsFromFiles: processed 16 files in 610.98 ms
[Info - 14:01:59] aura onDidChangeWatchedFiles...
aura onDidChangeWatchedFiles...

@q-jack
Copy link

q-jack commented Dec 12, 2019

same problem here as well

@stoevie
Copy link

stoevie commented Dec 12, 2019

since the beginning of this week I also have the same problem as danielenriquez.

@juliolima86
Copy link

This happens for me only when Indexing of Lightning Components occurs by Aura Component Extension. Only then my CPU utilization is 100% and PC is useless. It seems this indexing is a CPU hog.

image

+1

@danielenriquez
Copy link

Hi guys, VSC today's update fix the bug :)
Annotation 2019-12-13 090749

@AlejandroGil29
Copy link

Currently I,m having the same issue 'Indexing Lightning components' is taking to long to load and I have the newest version of Visual Studio Code:
VSCodeVersion

Any suggestions?

@smaddox-sf
Copy link
Contributor

Duplicate #2050

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests