🐛 Fix problem with token performance

This commit is contained in:
alonso.torres
2026-03-31 15:44:20 +02:00
parent d6dc0fe1a7
commit 6e2dc0c3dc

View File

@@ -332,9 +332,14 @@
(defn process-shape-changes!
[objects shape-changes]
(->> (rx/from shape-changes)
(rx/mapcat (fn [[shape-id props]] (process-shape! (get objects shape-id) props)))
(rx/subs! #(api/request-render "set-wasm-attrs"))))
(let [shape-changes
(->> shape-changes
;; We don't need to update the model for shapes not in the current page
(filter (fn [[shape-id _]] (shape-in-current-page? shape-id))))]
(when (d/not-empty? shape-changes)
(->> (rx/from shape-changes)
(rx/mapcat (fn [[shape-id props]] (process-shape! (get objects shape-id) props)))
(rx/subs! #(api/request-render "set-wasm-attrs"))))))
;; `conj` empty set initialization
(def conj* (fnil conj (d/ordered-set)))