-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix(performance): Fix n+1 issue when fetching calendar properties #54386
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
71ae60e to
e4337a5
Compare
st3iny
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.
Awesome! It's even worse on my local dev/testing instance where there are 40 individual queries for oc_properties on the PROPFIND 🙈
This comment was marked as resolved.
This comment was marked as resolved.
b6eecb2 to
f79c95e
Compare
|
Now we are down around 50% from 244 to 119 queries on |
3b85792 to
c67927a
Compare
274cbba to
8c2c149
Compare
8c2c149 to
677cfc1
Compare
677cfc1 to
7a168ef
Compare
…ne query Instead of doing it for each calendar individually. Signed-off-by: Carl Schwan <[email protected]>
39f7efd to
e77054f
Compare
Signed-off-by: Carl Schwan <[email protected]>
We already do that for files, we are now also doing for calendars. With relatively small amount of calendars, I managed to reduce the number of DB requests by 35% and from 23 DB requests touching the oc_properties table to only 3. Signed-off-by: Carl Schwan <[email protected]>
Signed-off-by: Carl Schwan <[email protected]>
e77054f to
9df79ba
Compare
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
Fix issue where we are requesting for each calendar individually the properties while we could query the properties for each calendar at the same time.
Before (with only 3 calendars):
After:
Checklist