alonso.torres 777b489381 🐛 Sync a swapped head that its layout skews like the shape it replaces
A layout skews a turned child that fills along its parent's axes. A
swapped copy head keeps the lengths of its own component and turned them
to the skewed axes of the main shape it replaces, so the layout squashed
it into another shape than that main; each later sync started from the
squashed head and moved it again. A 100px square turned 45 degrees in a
100px high row gave a 141x100 rhombus for the main and an ordinary copy,
and 163x100, then 156x100, for the swapped copy.

A swapped head that its layout skews now takes the turn its rotation and
flips give, without the skew: its content main is oriented with that
turn, and its placement resets it from its own component and turns it
like the replaced shape's unskewed turn. The layout then skews it as it
skews the main.

Benchmark (scripts/bench-components, ms, lower 2.5% quantile):

|                             :world | :baseline |   :now |   :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 |  21.39 |   22.34 |   0.61 |
| edit-through-a-chain-of-dependents |    68.931 | 42.155 |  43.846 |   0.61 |
|         library-update-into-copies |    83.083 | 47.467 |   51.34 |   0.57 |
|        main-edit-among-many-shapes |     4.837 |  2.026 |   2.265 |   0.42 |
|           main-edit-into-10-copies |      1.79 |  1.025 |   1.065 |   0.57 |
|          main-edit-into-100-copies |    15.415 |  9.538 |  10.051 |   0.62 |
|         main-edit-into-1000-copies |   153.086 | 96.813 | 102.667 |   0.63 |
|         variant-switch-into-copies |    32.052 | 21.011 |  22.247 |   0.66 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:47 +01:00
..
2022-11-08 13:02:14 +01:00