Commit c19aea7
committed
Migrate passive phase to depth first traversal
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.1 parent 665d125 commit c19aea7
6 files changed
Lines changed: 371 additions & 190 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
269 | 274 | | |
270 | 275 | | |
271 | 276 | | |
272 | | - | |
| 277 | + | |
273 | 278 | | |
274 | 279 | | |
275 | 280 | | |
| |||
353 | 358 | | |
354 | 359 | | |
355 | 360 | | |
356 | | - | |
| 361 | + | |
357 | 362 | | |
358 | 363 | | |
359 | 364 | | |
360 | 365 | | |
361 | 366 | | |
362 | 367 | | |
363 | 368 | | |
364 | | - | |
| 369 | + | |
365 | 370 | | |
366 | 371 | | |
367 | 372 | | |
| |||
370 | 375 | | |
371 | 376 | | |
372 | 377 | | |
373 | | - | |
| 378 | + | |
374 | 379 | | |
375 | 380 | | |
376 | 381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2007 | 2007 | | |
2008 | 2008 | | |
2009 | 2009 | | |
2010 | | - | |
| 2010 | + | |
| 2011 | + | |
2011 | 2012 | | |
2012 | 2013 | | |
2013 | 2014 | | |
| |||
2998 | 2999 | | |
2999 | 3000 | | |
3000 | 3001 | | |
3001 | | - | |
| 3002 | + | |
3002 | 3003 | | |
3003 | 3004 | | |
3004 | 3005 | | |
| |||
0 commit comments