mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 01:22:01 +00:00
A swap gives the new head the layout item values of the head it replaces, without touching it. A variant switch then carries the old head's overrides, but skips any attribute that already has the old value, so the kept layout item values lost the overrides that authored them: a later sync of a copy could replace them, and reset no longer saw them. A switch also gives the new head the touched groups of the kept attributes the old head had. The model expects the old head's layout item overrides to survive a switch. Benchmark (scripts/bench-components, ms, lower 2.5% quantile): | world | baseline | now | ratio | |------------------------------------+----------+---------+-------| | deepest-edit-through-three-levels | 35.215 | 18.466 | 0.52 | | edit-through-a-chain-of-dependents | 68.931 | 38.447 | 0.56 | | library-update-into-copies | 83.083 | 45.429 | 0.55 | | main-edit-among-many-shapes | 4.837 | 2.162 | 0.45 | | main-edit-into-10-copies | 1.79 | 1.064 | 0.59 | | main-edit-into-100-copies | 15.415 | 9.072 | 0.59 | | main-edit-into-1000-copies | 153.086 | 89.75 | 0.59 | | variant-switch-into-copies | 32.052 | 19.484 | 0.61 | AI-assisted-by: claude-opus-5-5