Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: performance degradation #6347

Merged
merged 23 commits into from Aug 15, 2022
Merged

Fix: performance degradation #6347

merged 23 commits into from Aug 15, 2022

Conversation

tiensonqin
Copy link
Contributor

@tiensonqin tiensonqin commented Aug 13, 2022

  1. fix performance degradation introduced by fixing linked references
  2. switching to avet index to speed up db/get-block-children-ids
  3. refresh reactive queries for related ::refs and ::block-and-children instead of all of them in query-state, the result is that editing in both queries and linked references will be fast compared to the master branch
  4. fix :block/path-refs not re-computed when moving blocks up/down
  5. delay file writes for long pages
  6. close existing modals when start editing

@tiensonqin tiensonqin marked this pull request as ready for review August 15, 2022 09:07
(not (.contains (.-classList target) "ignore-outside-event")))
(on-hide state e :click))))]
(when-not (false? outside?)
(listen state js/window "mouseup" click-fn)))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed the issue that the dropdown modal is not closed when editing a block.
https://www.loom.com/share/9241a366ed7548b6a73877b8c790c96f

(recur (conj result parent) parent)
result))))

(defn- get-blocks-parents-from-both-dbs
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need parents from both dbs because some refs could be deleted from the previous db.

Copy link
Collaborator

@andelf andelf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andelf andelf mentioned this pull request Aug 15, 2022
1 task
Copy link
Collaborator

@cnrpman cnrpman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on some long pages. Smooth & robust 🚀

LGTM

@tiensonqin tiensonqin merged commit 48ce3bf into master Aug 15, 2022
@tiensonqin tiensonqin deleted the fix/performance-degradation branch August 15, 2022 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants