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

[Bug] High CPU Usage and Out of Memory Issue in Chrome #4801

Open
2 tasks done
JMGomes opened this issue Jan 15, 2025 · 1 comment
Open
2 tasks done

[Bug] High CPU Usage and Out of Memory Issue in Chrome #4801

JMGomes opened this issue Jan 15, 2025 · 1 comment

Comments

@JMGomes
Copy link

JMGomes commented Jan 15, 2025

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

Using this library causes severe performance issues, particularly in Chrome:

Chrome: The browser runs out of memory, with CPU usage spiking to nearly 100% as shown in Chrome DevTools. Additionally, an excessive number of DOM nodes are created, contributing to the problem.
Other Browsers: While the issue does not result in an out-of-memory error, it still leads to noticeable performance degradation.
Steps to Reproduce:

Set a fixed height on instance (e.g., 800px).
Populate the editor with a large amount of text.
Scroll up and down quickly (at a faster pace than typical reading).
Observe the performance impact:
Noticeable performance degradation, particularly in Chrome.
In Chrome, extreme memory usage and high CPU consumption can occur.
This issue becomes more evident when the text within the editor is large enough to stress the rendering and scrolling performance.

My app (angular) is breaking because of this. Makes me believe there monaco-editor demos are really small because of this...

Monaco Editor Playground Code

Reproduction Steps

Set a fixed height on instance (e.g., 800px).
Populate the editor with a large amount of text.
Scroll up and down quickly (at a faster pace than typical reading).
Observe the performance impact:
Noticeable performance degradation, particularly in Chrome.
In Chrome, extreme memory usage and high CPU consumption can occur.
This issue becomes more evident when the text within the editor is large enough to stress the rendering and scrolling performance.

Actual (Problematic) Behavior

No response

Expected Behavior

No response

Additional Context

Image

this is causing out of memory issues. see chrome debug dump:

Image

@JMGomes
Copy link
Author

JMGomes commented Jan 16, 2025

This might be related to the broken worker import:
#4654

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

No branches or pull requests

1 participant