mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 08:26:40 +00:00
fix: entity-util/{journal?,whiteboard?,page?} calls
Split up fns of these checks into entity-util, file-entity-util and common-entity-util so that we have explicit fns for checking in single or multi-graph contexts. By doing this, were were able to fix more than 20+ fns that were calling general fns in a single graph context e.g. checking for :block/type in DB graph only namespaces. Some of these calls were happening on every :block/title lookup so there may be some perf enhancements
This commit is contained in:
@@ -77,7 +77,9 @@
|
||||
|
||||
(defn- validate-multi-graph-fns-not-in-file-or-db
|
||||
[]
|
||||
(let [multi-graph-fns ["config/db-based-graph\\?" "sqlite-util/db-based-graph\\?"]
|
||||
(let [multi-graph-fns ["config/db-based-graph\\?" "sqlite-util/db-based-graph\\?"
|
||||
;; Use file-entity-util and entity-util when in a single graph context
|
||||
"ldb/whiteboard\\?" "ldb/journal\\?" "ldb/page\\?"]
|
||||
res (apply shell {:out :string :continue true}
|
||||
"git grep -E" (str "(" (string/join "|" multi-graph-fns) ")")
|
||||
(into file-graph-paths db-graph-paths))]
|
||||
|
||||
Reference in New Issue
Block a user