diff --git a/src/main/frontend/db/rtc/core.cljs b/src/main/frontend/db/rtc/core.cljs index 6976e846d5..457edc1bf0 100644 --- a/src/main/frontend/db/rtc/core.cljs +++ b/src/main/frontend/db/rtc/core.cljs @@ -122,10 +122,10 @@ (outliner-tx/transact! {:persist-op? false} (if move? - (do (outliner-core/move-blocks! [b] local-left sibling?) - (when (and content (not= (:block/content b-ent) content)) + (do (when (and content (not= (:block/content b-ent) content)) (outliner-core/save-block! (assoc (db/pull repo '[*] [:block/uuid (uuid block-uuid-str)]) - :block/content content)))) + :block/content content))) + (outliner-core/move-blocks! [b] local-left sibling?)) (outliner-core/insert-blocks! [{:block/uuid (uuid block-uuid-str) :block/content content :block/format :markdown}] local-left {:sibling? sibling? :keep-uuid? true})))) @@ -280,16 +280,11 @@ update-ops (vals update-ops-map) update-page-ops (vals update-page-ops-map) remove-page-ops (vals remove-page-ops-map)] - (prn :start-apply-remote-update-page-ops) - (apply-remote-update-page-ops state update-page-ops) - (prn :start-apply-remote-remove-ops) - (apply-remote-remove-ops state remove-ops) - (prn :start-apply-remote-move-ops) - (apply-remote-move-ops state sorted-move-ops) - (prn :start-apply-remote-update-ops) - (apply-remote-update-ops state update-ops) - (prn :start-apply-remote-remove-page-ops) - (apply-remote-remove-page-ops state remove-page-ops) + (util/profile ::apply-remote-update-page-ops (apply-remote-update-page-ops state update-page-ops)) + (util/profile ::apply-remote-remove-ops (apply-remote-remove-ops state remove-ops)) + (util/profile ::apply-remote-move-ops (apply-remote-move-ops state sorted-move-ops)) + (util/profile ::apply-remote-update-ops (apply-remote-update-ops state update-ops)) + (util/profile ::apply-remote-remove-page-ops (apply-remote-remove-page-ops state remove-page-ops)) (c (op/> update-page-uuids (keep (fn [block-uuid] (when-let [page-name (:block/name (db/entity repo [:block/uuid (uuid block-uuid)]))] diff --git a/src/main/frontend/db/rtc/debug_ui.cljs b/src/main/frontend/db/rtc/debug_ui.cljs index e54e2b5322..1bed568fb3 100644 --- a/src/main/frontend/db/rtc/debug_ui.cljs +++ b/src/main/frontend/db/rtc/debug_ui.cljs @@ -13,8 +13,8 @@ [frontend.util :as util] [frontend.handler.notification :as notification])) -(defonce ^:private debug-state (atom nil)) -(def debug-graph-uuid "6478874f-20a7-4335-9379-4cfb1cfa1b25") +(defonce debug-state (atom nil)) +(def debug-graph-uuid "c9d334d8-977a-428c-af53-25261de27db5") (defn-