holiber/sl-vue-tree

Bad update algorithm

evgencode opened this issue · 1 comments

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

Thanks for noticing that. PRs are appreciated