mirror of https://github.com/status-im/reagent.git
Slimline batching a little
This commit is contained in:
parent
6a206eccf3
commit
f940ac3f38
|
@ -36,17 +36,16 @@
|
||||||
(.sort a compare-mount-order)
|
(.sort a compare-mount-order)
|
||||||
(dotimes [i (alength a)]
|
(dotimes [i (alength a)]
|
||||||
(let [c (aget a i)]
|
(let [c (aget a i)]
|
||||||
(when (.' c :cljsIsDirty)
|
(when (true? (.' c :cljsIsDirty))
|
||||||
(let [a (.' c :cljsRatom)]
|
(if (ratom/-check-clean (.' c :cljsRatom))
|
||||||
(if (ratom/-check-clean a)
|
(.! c :cljsIsDirty false)
|
||||||
(.! c :cljsIsDirty false)
|
(.' c forceUpdate))))))
|
||||||
(.' c forceUpdate)))))))
|
|
||||||
|
|
||||||
(defn run-funs [a]
|
(defn run-funs [a]
|
||||||
(dotimes [i (alength a)]
|
(dotimes [i (alength a)]
|
||||||
((aget a i))))
|
((aget a i))))
|
||||||
|
|
||||||
(deftype RenderQueue [^:mutable queue ^:mutable scheduled?
|
(deftype RenderQueue [^:mutable queue ^:mutable ^boolean scheduled?
|
||||||
^:mutable after-render]
|
^:mutable after-render]
|
||||||
Object
|
Object
|
||||||
(queue-render [this c]
|
(queue-render [this c]
|
||||||
|
@ -113,4 +112,3 @@
|
||||||
(some-> (.' c :cljsRatom)
|
(some-> (.' c :cljsRatom)
|
||||||
ratom/dispose!)
|
ratom/dispose!)
|
||||||
(mark-rendered c))
|
(mark-rendered c))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue