You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made an example branch (https://github.com/hersentino/mobx-keystone-issue/tree/middleware) which shows that actionTrackingMiddleware has some slowness even if onStart/onEnd do nothing. Just calling it takes about 25ms. 50 ms if the data passed in parameter to the modelAction are big.
The problem is if I call modelAction inside modelAction n times it can significantly impact the global performance.
Do you have an idea explaining these durations ?
Thanks :)
The text was updated successfully, but these errors were encountered:
it takes longer because you are measuring the detachment of the old big tree as part of the instantiation of the new small tree
if you add
this.setMainModel(undefined);
after each setMain model you will see the following results instead:
With big data
time of instanciation with fromGrpc without middleware : 789.8999999910593 ms
time of instanciation with fromGrpc with middleware : 854.8999999910593 ms
time took by the middleware 65 ms
With small data
time of instanciation with fromGrpc without middleware : 0.29999999701976776 ms
time of instanciation with fromGrpc with middleware : 0.8999999910593033 ms
time took by the middleware 0.5999999940395355 ms
Hello,
I made an example branch (https://github.com/hersentino/mobx-keystone-issue/tree/middleware) which shows that actionTrackingMiddleware has some slowness even if onStart/onEnd do nothing. Just calling it takes about 25ms. 50 ms if the data passed in parameter to the modelAction are big.
The problem is if I call modelAction inside modelAction n times it can significantly impact the global performance.
Do you have an idea explaining these durations ?
Thanks :)
The text was updated successfully, but these errors were encountered: