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

rendering a lot of outputs to DOM causes browser and computer to freeze #31

Open
zakariamouhid opened this issue Nov 7, 2020 · 0 comments

Comments

@zakariamouhid
Copy link

example

MAIN -> "a":+:+:+

test with "aaaa" and add "a" one by one.

note:

  • it freezes the page and some times the computer
  • it uses alot of ram and hard disk

cause

this problem caused by rendering a lot of elements to the DOM.

solution

I think it could be fixed by limiting the outputs to 100 item

.then(outputs => this.setState({outputs}))

.then(outputs => this.setState({outputs: outputs.slice(0, 100)})) 

thank you 👍

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