mirror of
https://github.com/logseq/logseq.git
synced 2026-05-26 13:44:13 +00:00
fix: slow re-index
This commit is contained in:
@@ -9,13 +9,12 @@
|
||||
|
||||
(defn invoke-hooks
|
||||
[tx-report]
|
||||
(let [{:keys [pages blocks]} (ds-report/get-blocks-and-pages tx-report)]
|
||||
(when-not (:from-disk? (:tx-meta tx-report))
|
||||
(doseq [p (seq pages)] (updated-page-hook tx-report p)))
|
||||
(when (and state/lsp-enabled? (seq blocks))
|
||||
(state/pub-event! [:plugin/hook-db-tx
|
||||
{:blocks blocks
|
||||
:tx-data (:tx-data tx-report)
|
||||
:tx-meta (:tx-meta tx-report)}]))
|
||||
;; TODO: Add blocks to hooks
|
||||
#_(doseq [b (seq blocks)])))
|
||||
(when (and (not (:from-disk? (:tx-meta tx-report)))
|
||||
(not (:new-graph? (:tx-meta tx-report))))
|
||||
(let [{:keys [pages blocks]} (ds-report/get-blocks-and-pages tx-report)]
|
||||
(doseq [p (seq pages)] (updated-page-hook tx-report p))
|
||||
(when (and state/lsp-enabled? (seq blocks))
|
||||
(state/pub-event! [:plugin/hook-db-tx
|
||||
{:blocks blocks
|
||||
:tx-data (:tx-data tx-report)
|
||||
:tx-meta (:tx-meta tx-report)}])))))
|
||||
|
||||
Reference in New Issue
Block a user