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.

Browser is stuck and Memory keeps raising after typing in editor

See original GitHub issue

Problem

set maxLines as 1 or 2, with onLoad set wrap mode as true at the same time, click before the last curly brace and type Enter button to make the editor formatting automatically, you will find the browser stuck and the memory raising.

Sample code to reproduce your issue

<AceEditor
      mode="json" maxLines={2} value={"{\"a\":\"b\"}"}
      onLoad={editor => editor.getSession().setUseWrapMode(true)}
/>

or visit the simple project react-ace-editor-issuse

References

Initial memory and CPU tim 20170706095723 10 sec after type Enter button tim 20170706095813

Progress on: # Win 10 / Chrome 58&IE 11/ React 15.6.1

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
hirohecommented, Jun 28, 2018

i am using React v16.4, react-ace v6.1.2

  1. setup with create-react-app
  2. and test with code below, setting AceEditor with maxLines and wrapEnabled
class App extends React.Component {
  render() {

    const props = {
      mode: 'javascript',
      theme: 'monokai',
      value: 'const test = \'hello loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text\'',
      maxLines: 1,
      wrapEnabled: true,
    };

    return (
      <div>
        <AceEditor {...props} />
      </div>
    );
  }
}

and it will cause cpu and memory raising image

0reactions
nightwingcommented, Apr 19, 2021

@malavshah9 are you seeing this with the current version of react-ace? this used to happen with the older version, which was using the old version of ace, which had this bug, but it is fixed on ace version 1.4.12

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix memory problems - Microsoft Edge Development
Use Microsoft Edge DevTools to find memory issues that affect page performance, including memory leaks, memory bloat, and frequent garbage ...
Read more >
Here are the ways to fix 'Google Chrome Is Out of Memory' error
1. Restart your device. 2. Update Google Chrome. 3. Clear the browser's cache.
Read more >
Fix High RAM Memory Usage Issue on Windows 11/10 [10 ...
10 Fixes for High (RAM) Memory Usage Issue on Windows 11/10 · 1. Close Unnecessary Running Programs/Applications · 2. Disable Startup Programs ·...
Read more >
How to fix out of memory errors by increasing available memory
Java applications like JIRA, Crowd and Confluence run in a "Java virtual machine" (JVM), instead of directly within an operating system. When ......
Read more >
Chrome eats all available memory, causing the system to ...
I may be reproduce this in next way. I start browser with one tab opened only. Remember amount of ram (as A) taken...
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