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

feat: Optimize db evaluation #416

Merged
merged 6 commits into from
Jul 14, 2024
Merged

feat: Optimize db evaluation #416

merged 6 commits into from
Jul 14, 2024

Conversation

fsbraun
Copy link
Member

@fsbraun fsbraun commented Jul 13, 2024

Description

This PR halves the number of queries needed for the page tree's state indicator. This improves responsiveness of the page tree.

It also reduces the number of DB queries when populating the toolbar.

Related resources

Checklist

  • I have opened this pull request against master
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on
    Slack to find a “pr review buddy” who is going to review my pull request.

Copy link
Member

@marksweb marksweb left a comment

Choose a reason for hiding this comment

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

Where changes being lower db hits its useful to add tests that assert the number of queries made so we can avoid regression.

@fsbraun
Copy link
Member Author

fsbraun commented Jul 14, 2024

@marksweb Indeed. I added a test that ensures one query by indicator.

@fsbraun fsbraun merged commit 778254f into master Jul 14, 2024
109 checks passed
@fsbraun fsbraun deleted the fix/db-optimization branch July 14, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants