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
Because the passive phase happens after paint, I expect it's least
likely to cause a performance regression.
In terms of implementation complexity, however, it's probably the
riskiest. Ideally, for this initial step, we would change nothing except
the traversal logic. However, the old implementation is pretty weird; it
doesn't really use the effect list in the normal way that the other
phases do. Instead, it pushes effects into a pair global arrays (one for
mount effects, one for unmount effects) during the layout phase.
For those reasons, I think it makes sense to split this phase out
into its own step.
There's also potential for upside since we're removing code from the
layout phase.
The other phases are hard to justify migrating one at a time because
the overhead of doing a depth-first search while also keeping track of
an effect list is larger than if we just migrate them all at once.
0 commit comments