🔧 Throttle hover-related WASM calls

This commit is contained in:
Elena Torro 2026-03-09 17:14:19 +01:00
parent 2b16f9631e
commit 804d94d0cc

View File

@ -219,6 +219,10 @@
(->> move-stream
(rx/tap #(reset! last-point-ref %))
;; Throttle hover queries to avoid flooding the worker
;; and reduce sync WASM calls (intersect-position-in-shape)
;; when the main thread is busy with rendering.
(rx/throttle 16)
;; When transforming shapes we stop querying the worker
(rx/merge-map query-point)))