Batch request-render after WASM attr updates

Coalesce process-shape-changes! into a single request-render once all
shapes are updated instead of scheduling one render per shape.
This commit is contained in:
Alejandro Alonso 2026-08-28 12:37:19 +02:00
parent 30e700a07e
commit d29dab7941

View File

@ -341,7 +341,8 @@
(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")))))))
(rx/reduce conj [])
(rx/subs! (fn [_] (api/request-render "set-wasm-attrs"))))))))
;; `conj` empty set initialization
(def conj* (fnil conj (d/ordered-set)))