e35ad2f2dc
With React.memo: ``` bench_hmr_to_commit/Turbopack CSR/30000 modules time: [50.608 ms 51.659 ms 52.553 ms] ``` Without React.memo: ``` bench_hmr_to_commit/Turbopack CSR/30000 modules time: [853.47 ms 1.0191 s 1.1873 s] change: [+1543.4% +1872.7% +2207.8%] (p = 0.00 < 0.05) Performance has regressed. ``` Since we're only ever editing the top-level triangle in our HMR benchmarks, we're incurring the time it takes for React to re-render the whole tree, which is a function of the number of components in said tree. By using `React.memo`, we can skip updating children components during HMR. |
||
---|---|---|
.. | ||
bundlers | ||
util | ||
mod.rs |