I am developing an outlining note-taking tool based on react and mobx-keystone, and I encouter a problem: when the outline tree grows too large (with about 2000 nodes), every action handled by mobx-keystone is rather slow, I debug it via "chrome performance", and locate the slow part of mobx-keystone as follow:
I am developing an outlining note-taking tool based on react and mobx-keystone, and I encouter a problem: when the outline tree grows too large (with about 2000 nodes), every action handled by mobx-keystone is rather slow, I debug it via "chrome performance", and locate the slow part of mobx-keystone as follow:
Each action will trigger the loop 'while (!ch.done)', in a 2000-nodes model tree, the loop count can be up to 50000 times.
according to the above information, how can I optimize the performance ?