mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 01:22:01 +00:00
The remote shape of a copy's child was looked up in the component of its outermost copy, then in the component of its nearest head. A copy nested in a swapped copy refers to the main of the swapped copy's component, which is neither: a switch of that nested copy found no remote shape for it, paired a touched child with the new root and crashed comparing their geometry. The fallback tries the component of each parent head, from the nearest one up. Benchmark (scripts/bench-components, ms, lower 2.5% quantile): | world | baseline | now | ratio | |------------------------------------+----------+---------+-------| | deepest-edit-through-three-levels | 35.215 | 21.863 | 0.62 | | edit-through-a-chain-of-dependents | 68.931 | 39.725 | 0.58 | | library-update-into-copies | 83.083 | 48.505 | 0.58 | | main-edit-among-many-shapes | 4.837 | 2.747 | 0.57 | | main-edit-into-10-copies | 1.79 | 1.019 | 0.57 | | main-edit-into-100-copies | 15.415 | 9.565 | 0.62 | | main-edit-into-1000-copies | 153.086 | 100.188 | 0.65 | | variant-switch-into-copies | 32.052 | 21.229 | 0.66 | AI-assisted-by: claude-opus-5-5