mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 10:28:31 +02:00
✨ Mainly cosmetic and performance improvements on shape render.
This commit is contained in:
parent
a3c583af1d
commit
c5f4ae2242
6 changed files with 80 additions and 67 deletions
|
@ -27,16 +27,6 @@
|
|||
;; percentiles of render time measures. The log function is
|
||||
;; automatically debouced for avod excesive spam to the console.
|
||||
|
||||
;; #?(:clj
|
||||
;; (defmacro with-measure
|
||||
;; [name & body]
|
||||
;; `(let [start# (js/performance.now)
|
||||
;; res# (do ~@body)
|
||||
;; end# (js/performance.now)
|
||||
;; time# (.toFixed (- end# start#) 2)]
|
||||
;; (println (str "[perf|" ~name "] => " time#))
|
||||
;; res#)))
|
||||
|
||||
(defn tdigest
|
||||
[]
|
||||
(specify! (td/TDigest.)
|
||||
|
@ -111,7 +101,7 @@
|
|||
(mf/deps label)
|
||||
#(on-render-factory label))]
|
||||
(if enabled?
|
||||
[:> react/Profiler {:id label
|
||||
:on-render on-render}
|
||||
[:> react/Profiler #js {:id label
|
||||
:onRender on-render}
|
||||
children]
|
||||
children)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue