mirror of
https://github.com/penpot/penpot.git
synced 2026-08-29 16:18:48 +00:00
⚡ 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:
parent
30e700a07e
commit
d29dab7941
@ -341,7 +341,8 @@
|
|||||||
(when (d/not-empty? shape-changes)
|
(when (d/not-empty? shape-changes)
|
||||||
(->> (rx/from shape-changes)
|
(->> (rx/from shape-changes)
|
||||||
(rx/mapcat (fn [[shape-id props]] (process-shape! (get objects shape-id) props)))
|
(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
|
;; `conj` empty set initialization
|
||||||
(def conj* (fnil conj (d/ordered-set)))
|
(def conj* (fnil conj (d/ordered-set)))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user