Closed darkowic closed 4 years ago
Shit, yes forget about this.
@FredyC I think we still need to revert the batching-opt-in change? We really can't do that in a minor update, it hurts serious applications really bad and probably no test will detect it.
@darkowic So you haven't noticed that "friendly" warning what you need to do?
Yeah, I didn't notice any warning
And can you please confirm that after following these instructions the performance is back on track?
I just checked it. Adding require('mobx-react/batchingForReactDom');
didn't solve it.
[Violation] 'click' handler took 34428ms
- creating 10k rows...
You have to take a look at this benchmark I guess.
Alright, thank you for the report in that case and we will have a closer look.
There are fairly big jumps between versions for mobx
(5.0.3 -> 5.15.4) and mobx-react
(5.2.3 -> 6.2.2). It will be an interesting discovery path for sure :) Might be a problem of MobX itself.
Just tried to narrow this done, it seems that the react update itself causes the difference. As soon as I upgrade to react 6.13.1, the perf drops from 3 to 40 secs, with the same mobx / mobx-react version. Does this ring a bell to anyone?
Edit: drop happens between react 6.5.2 and 6.6.0
Edit: looks like we need to update some build deps: https://github.com/facebook/react/issues/13987
Edit: using Terser fixes the issue indeed.
This is mindblowing :exploding_head: I would not expect minifier to do that... Thank you for the investigation!
Yeah, it's super sad! Glad someone else found that out before, would never have figured that out myself.
After upgrading react, mobx and mobx-react to latest version in https://github.com/krausest/js-framework-benchmark/tree/master/frameworks/keyed/react-mobX I found huge performance drop in the benchmark. The example is really simple but I don't know what is the problem.
How to reproduce the issue
Upgrade react, mobx and mobx-react to the latest version and run the benchmark.
Versions