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

Make comments.user_id not nullable and tweak some joins #4048

Merged
merged 2 commits into from
Jun 16, 2020

Conversation

mattiaverga
Copy link
Contributor

This splits off joins changes from #4017
Setting the user_id field for comments to be not nullable makes possible to use faster inner joins. Also, I've disable the lazy='joined' relationship property in the Update model against builds and comments: this will avoid to unconditionally load all the builds and all the comments associated to the update when we retrieve it from the database.
In my opinion, this should give better performance. Locally I can see some speed improvements when loading some pages, like builds or users lists, but unfortunately the updates page list is not getting substantial improvement.

Signed-off-by: Mattia Verga mattia.verga@tiscali.it

@mattiaverga mattiaverga requested a review from a team as a code owner June 2, 2020 12:13
Signed-off-by: Mattia Verga <mattia.verga@tiscali.it>
@mattiaverga
Copy link
Contributor Author

I'm not sure if these CI test failures are real or not, I'm not able to reproduce them locally...
It would be nice to see in staging if this change can fix https://pagure.io/fedora-infrastructure/issue/8949

Signed-off-by: Mattia Verga <mattia.verga@tiscali.it>
Copy link
Contributor

@cverna cverna left a comment

Choose a reason for hiding this comment

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

I ran the tests locally and every was green, so going to merge this manually.

Thanks for the PR.

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