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

Bad update algorithm #50

Open
evgencode opened this issue Feb 28, 2019 · 1 comment
Open

Bad update algorithm #50

evgencode opened this issue Feb 28, 2019 · 1 comment
Assignees

Comments

@evgencode
Copy link

evgencode commented Feb 28, 2019

Everywere is used
const newNodes = this.copy(this.currentValue);
This is a very resource-intensive operation.
I have the data with about 600 nodes.
If I just select node JSON.parse(JSON.stringify(entity)) happens for whole tree.
It works very very slow.
I think it should to revise the update node algorithm.

Maybe this will help:
https://jsperf.com/deep-copy-vs-json-stringify-json-parse/5

@holiber holiber self-assigned this Mar 5, 2019
@holiber
Copy link
Owner

holiber commented Mar 5, 2019

Thanks for noticing that. PRs are appreciated

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

Successfully merging a pull request may close this issue.

2 participants