mirror of
https://github.com/logseq/logseq.git
synced 2026-05-04 19:06:21 +00:00
perf: db reload
Load as less pages && closed values as we can to avoid loading too much data. We already know that transacting db attributes is slow, going to investigate it later.
This commit is contained in:
10
src/main/frontend/external/roam_export.cljs
vendored
10
src/main/frontend/external/roam_export.cljs
vendored
@@ -22,16 +22,16 @@
|
||||
|
||||
(defn <uuid->uid-map []
|
||||
(let [repo (state/get-current-repo)]
|
||||
(p/let [result (db-async/<q repo
|
||||
(p/let [result (db-async/<q repo {:transact-db? false}
|
||||
'[:find (pull ?r [:block/uuid])
|
||||
:in $
|
||||
:where
|
||||
[?b :block/refs ?r]])]
|
||||
(->> result
|
||||
(map (comp :block/uuid first))
|
||||
(distinct)
|
||||
(map (fn [uuid] [uuid (nano-id)]))
|
||||
(into {})))))
|
||||
(map (comp :block/uuid first))
|
||||
(distinct)
|
||||
(map (fn [uuid] [uuid (nano-id)]))
|
||||
(into {})))))
|
||||
|
||||
(defn update-content [content uuid->uid-map]
|
||||
(when content ; page block doesn't have content
|
||||
|
||||
Reference in New Issue
Block a user