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

improve query performance and commit performance in some cases #3

Merged
merged 7 commits into from
Jun 19, 2024

Conversation

hahn-kev
Copy link
Collaborator

@hahn-kev hahn-kev commented Jun 5, 2024

previously GetCurrentObjects would always filter on latest snapshots as a safety measure, however this is really bad for performance with a large database, and it's not nessecary considering the projected table is always the latest state. Removing the filter increases performance by an order of magnitude when a large number of commits is involved.

I also added the ability to defer updating snapshots, this can be used when intending to add multiple commits at a time (for example importing a project), the snapshots will be updated once the DataModel is disposed of by the IoC container. Though it might be a good idea to expose a method to explicitly update those defered updates

…D as the state of the projected table should be latest anyway
…e ever try to add a commit that's not deferred after adding some deferred ones
Copy link

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

LGTM after fixing the out of date todo

@hahn-kev hahn-kev merged commit 588167c into main Jun 19, 2024
3 checks passed
@hahn-kev hahn-kev deleted the chore/performance-pass branch June 19, 2024 16:30
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