mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 01:22:01 +00:00
Swapping or switching a head for a component checked only the copies in that component's main against the head's parents. A copy there could have swapped away a component that its own main still holds, so the swap passed, and a sync or reset that brought the held component back nested a component inside itself. The check now follows each component the new main holds into its main, through every level, as the nest check does. Benchmark (scripts/bench-components, lower quantile in ms): | world | baseline | now | ratio | |------------------------------------+----------+---------+-------| | deepest-edit-through-three-levels | 35.215 | 19.108 | 0.54 | | edit-through-a-chain-of-dependents | 68.931 | 39.394 | 0.57 | | library-update-into-copies | 83.083 | 45.356 | 0.55 | | main-edit-among-many-shapes | 4.837 | 2.251 | 0.47 | | main-edit-into-10-copies | 1.79 | 0.974 | 0.54 | | main-edit-into-100-copies | 15.415 | 9.266 | 0.60 | | main-edit-into-1000-copies | 153.086 | 94.168 | 0.62 | | variant-switch-into-copies | 32.052 | 20.366 | 0.64 | AI-assisted-by: claude-opus-5-5