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

High CPU Usage and Out of Memory Issue in Chrome #29

Closed
JMGomes opened this issue Jan 15, 2025 · 1 comment
Closed

High CPU Usage and Out of Memory Issue in Chrome #29

JMGomes opened this issue Jan 15, 2025 · 1 comment

Comments

@JMGomes
Copy link

JMGomes commented Jan 15, 2025

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 ngx-monaco-editor 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 is breaking because of this. Makes me believe there monaco-editor demos are really small because of this...

image

This is causing out of memory issues: (see chrome debug)
image

@JMGomes
Copy link
Author

JMGomes commented Jan 16, 2025

This might be related to the broken worker import:
microsoft/monaco-editor#4654

@miki995 miki995 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2025
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

2 participants