Can I optimise my React App reconciliation for performance?

37 Views Asked by At

I am optimising the performance of my React app. Most state changes seem to result in the following "Timings" in the chrome devtools performance tab:

"Timings" in the chrome devtools performance tab

As you can see, a fair chunk of time is spent on the reconciliation (completed root) step. This always seems to start at the root of the application (BrowserRouter)

BrowserRouter [update]

Is this the expected behaviour or should I ideally be seeing only a subtree of the component in which state is changing being reconciliated.

Thanks!

2

There are 2 best solutions below

1
Ric Barnes On

After further research, its seems that reconciliation may always start from the root and thus the main performance improvement that could be made is to simplify the component tree

0
张欢欢 On

Maybe you can try to use the Rendering-Paint flashing to checkout which componets have changed

enter image description here