mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 14:00:37 +00:00
A variant switch with keep-touched carries a swapped child into the new variant, but left it where it was in the old one. The next sync then moved it to the place of the child it replaces, at a moment unrelated to the switch. The switch now gives it that placement at once, through the same step sync uses: position, constraints and layout item attributes the user did not change. Benchmark, against the same code without this change under the same load (lower quantile, ms; without / with): deepest-edit-through-three-levels 36.0 / 36.0 edit-through-a-chain-of-dependents 65.2 / 70.2 library-update-into-copies 74.3 / 75.9 main-edit-into-10-copies 1.6 / 1.5 main-edit-into-100-copies 16.3 / 15.7 main-edit-into-1000-copies 162.6 / 165.8 variant-switch-into-copies 27.2 / 27.8 AI-assisted-by: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>