From 65cc2cf7c6f565f806e80586925199405e110bd0 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 4 Nov 2026 23:20:05 +0100 Subject: [PATCH] :fire: Remove the unused sync offset helper geometry-sync-delta gave the offset a sync applies to a swapped child's top-left. The sync places a swapped child with update-swapped-placement, so nothing calls it. Benchmark (scripts/bench-components, ms, lower 2.5% quantile): | world | baseline | now | ratio | |------------------------------------+----------+---------+-------| | deepest-edit-through-three-levels | 35.215 | 19.099 | 0.54 | | edit-through-a-chain-of-dependents | 68.931 | 37.265 | 0.54 | | library-update-into-copies | 83.083 | 47.334 | 0.57 | | main-edit-among-many-shapes | 4.837 | 2.055 | 0.42 | | main-edit-into-10-copies | 1.79 | 1.007 | 0.56 | | main-edit-into-100-copies | 15.415 | 9.18 | 0.60 | | main-edit-into-1000-copies | 153.086 | 92.235 | 0.60 | | variant-switch-into-copies | 32.052 | 20.23 | 0.63 | AI-assisted-by: claude-opus-5-5 --- common/src/app/common/logic/libraries.cljc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/common/src/app/common/logic/libraries.cljc b/common/src/app/common/logic/libraries.cljc index 19c2b0cbf2..42a5279a55 100644 --- a/common/src/app/common/logic/libraries.cljc +++ b/common/src/app/common/logic/libraries.cljc @@ -265,13 +265,6 @@ :include-deleted? true))] (recur shape-inst' next-data component'))))))) -(defn- geometry-sync-delta - "Offset the sync applies to the top-left of `dest-shape` when it copies the - geometry of `origin-shape`." - [dest-shape origin-shape dest-root origin-root] - (gpt/subtract (grc/rect->point (:selrect (reposition-shape origin-shape origin-root dest-root))) - (grc/rect->point (:selrect dest-shape)))) - (defn- follow-parent-modifiers "Modifiers that make `child` follow the change of its parent from `parent-before` to `parent-after`, through the child constraints."