perf: virtualized journals

This commit is contained in:
Tienson Qin
2025-03-21 17:28:50 +08:00
parent d20359080f
commit ea7836ba15
11 changed files with 119 additions and 163 deletions

View File

@@ -707,8 +707,7 @@
(let [default-home (get-default-home-if-valid)
current-repo (state/sub :git/current-repo)
loading-files? (when current-repo (state/sub [:repo/loading-files? current-repo]))
journals-length (state/sub :journals-length)
latest-journals (db/get-latest-journals (state/get-current-repo) journals-length)
latest-journals (db/get-latest-journals (state/get-current-repo) 1)
graph-parsing-state (state/sub [:graph/parsing-state current-repo])]
(cond
(or
@@ -736,7 +735,7 @@
(ui/loading (t :loading-files))
(seq latest-journals)
(journal/journals latest-journals)
(journal/all-journals)
;; FIXME: why will this happen?
:else