mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 17:50:38 +00:00
A copy grid that keeps its own cells held its children in its main's order, which can differ from the order its cells flow in. Updating the main from such a copy gave the main that order with the copy's cells, and a later reflow put the main back in its own flow while its copies kept the old order. A copy grid with its own cells now orders its children by the flow of its cells: sync orders it after taking them, and the grid reorder of an edit includes it, which a copy reorder has to allow. Update-main gives the main the copy's order in one change, as moving each child to its place could not be undone to the main's former order. Benchmark (scripts/bench-components, lower quantile in ms): | world | baseline | now | ratio | |------------------------------------+----------+---------+-------| | deepest-edit-through-three-levels | 35.215 | 18.54 | 0.53 | | edit-through-a-chain-of-dependents | 68.931 | 37.494 | 0.54 | | library-update-into-copies | 83.083 | 46.85 | 0.56 | | main-edit-among-many-shapes | 4.837 | 2.199 | 0.45 | | main-edit-into-10-copies | 1.79 | 0.943 | 0.53 | | main-edit-into-100-copies | 15.415 | 8.927 | 0.58 | | main-edit-into-1000-copies | 153.086 | 91.773 | 0.60 | | variant-switch-into-copies | 32.052 | 20.421 | 0.64 | AI-assisted-by: claude-opus-5-5