perf: skip loading classes for the initial data

re-init commands after pages has been loaded
pull/10933/head
Tienson Qin 2024-02-07 04:54:54 +08:00
parent 6c6cc8ec34
commit bd9ebaf3fd
2 changed files with 2 additions and 1 deletions

View File

@ -115,7 +115,7 @@
[db]
(->> (d/datoms db :avet :block/type)
(keep (fn [e]
(when (contains? #{"closed value" "class"} (:v e))
(when (contains? #{"closed value"} (:v e))
(d/pull db '[*] (:e e)))))))
(defn get-initial-data

View File

@ -51,6 +51,7 @@
(do
(util/profile "transact initial-pages" (d/transact! conn tx-data tx-meta))
(when end?
(state/pub-event! [:init/commands])
(ui-handler/re-render-root!)))
(do
(let [tx-report (d/transact! conn tx-data tx-meta)]