alonso.torres d3aea752d6 🐛 Give a grid copy its main's tracks when syncing its main's cells
Sync adds the copies of a main's new children before it removes those of
the children the main lost. Grouping two children of a full grid main
gave each grid copy one flow child more than its cells for a moment, so
it grew a column; the removals left that column empty and the next sync
dropped it. A copy that does not override its cells now takes its main's
tracks on each axis it does not override (all of them on a reset) before
it takes its main's cells.

Benchmark (lower quantile, ms):

| world                              | baseline |     now |    mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  20.772 |  21.537 |  0.59 |
| edit-through-a-chain-of-dependents |   68.931 |  41.197 |  42.556 |  0.60 |
| library-update-into-copies         |   83.083 |  49.581 |  51.122 |  0.60 |
| main-edit-among-many-shapes        |    4.837 |   2.181 |   2.405 |  0.45 |
| main-edit-into-10-copies           |    1.79  |   1.108 |   1.158 |  0.62 |
| main-edit-into-100-copies          |   15.415 |  10.273 |  10.948 |  0.67 |
| main-edit-into-1000-copies         |  153.086 | 100.399 | 109.973 |  0.66 |
| variant-switch-into-copies         |   32.052 |  21.866 |  22.788 |  0.68 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:49 +01:00
..