alonso.torres 189be55a15 🐛 Store the turn a transform decomposes into when a turn flips it
Turning a subtree to match another orientation stores, for each shape,
its old rotation plus the turn, or minus it when only that one fits its
flips. A turn that also drops or adds a flip leaves neither fitting: a
switch from an unflipped variant to a flipped one kept the copy's
unflipped turn in the transform but stored the flipped main's rotation.

When neither fits, the shape stores the rotation its transform
decomposes into with its flips.

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

| world                              | baseline |     now | ratio |
|------------------------------------+----------+---------+-------|
| deepest-edit-through-three-levels  |   35.215 |  19.641 |  0.56 |
| edit-through-a-chain-of-dependents |   68.931 |  38.794 |  0.56 |
| library-update-into-copies         |   83.083 |  46.743 |  0.56 |
| main-edit-among-many-shapes        |    4.837 |   2.355 |  0.49 |
| main-edit-into-10-copies           |     1.79 |   0.997 |  0.56 |
| main-edit-into-100-copies          |   15.415 |   9.669 |  0.63 |
| main-edit-into-1000-copies         |  153.086 |  97.248 |  0.64 |
| variant-switch-into-copies         |   32.052 |   21.73 |  0.68 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:46 +01:00
..
2026-11-10 20:21:16 +01:00
2026-09-29 09:07:34 +02:00
2026-03-11 15:24:40 +01:00