-
-
Notifications
You must be signed in to change notification settings - Fork 937
Compile db view joins in parallel, add instance join #6147
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
Conversation
810ba8d to
2cfe3de
Compare
2cfe3de to
a607c49
Compare
dessalines
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a feeling this is going to conflict with some existing PRs, so lets do them in order before merging this
| }; | ||
|
|
||
| #[diesel::dsl::auto_type(no_type_alias)] | ||
| pub fn notification_joins(person_id: PersonId, instance_id: InstanceId) -> _ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to me. Might be a little weird to spread out join and query logic into different crates, but I don't have a problem with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory it should also be possible to move the entire query logic into this crate and pass in NotificationView as generic parameter to speed up compilation even more. But its very complicated to make that work. Or for count it should be easy to move it here as it doesnt require NotificationView.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at a recent CI run, cargo test is now the slowest item. I don't think there's been too much progress on #5846 but that's the next speed bottleneck.
Move db joins into separate crates so they can be compiled in parallel with db_schema. This reduces build time by ~8s on my computer. In theory we could move even more sql logic into those crates.
Before:

After:
