mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 17:50:38 +00:00
An update main that pushes a copy's swap into a copy inside the main makes the head a plain copy of its position when both have the same component, and gives it the position's size unless the replaced child authored its geometry. A head whose copy authored its own geometry took that touched group into the main but the position's size, so the main kept a geometry override it did not hold. Such a head now keeps the size it pushes. Test: updating-a-main-after-a-reset-keeps-the-size-a-switch-gave-the-copy (the scale gate program of seed 175377838). Benchmark (scripts/bench-components, ms, lower 2.5% quantile): | :world | :baseline | :now | :mean | :ratio | |------------------------------------+-----------+--------+---------+--------| | deepest-edit-through-three-levels | 35.215 | 20.374 | 21.102 | 0.58 | | edit-through-a-chain-of-dependents | 68.931 | 40.71 | 44.564 | 0.59 | | library-update-into-copies | 83.083 | 48.986 | 51.548 | 0.59 | | main-edit-among-many-shapes | 4.837 | 2.255 | 2.557 | 0.47 | | main-edit-into-10-copies | 1.79 | 0.987 | 1.028 | 0.55 | | main-edit-into-100-copies | 15.415 | 10.394 | 10.601 | 0.67 | | main-edit-into-1000-copies | 153.086 | 99.622 | 102.888 | 0.65 | | variant-switch-into-copies | 32.052 | 21.928 | 23.985 | 0.68 | AI-assisted-by: claude-opus-5-5