Skip to content

Conversation

@CarlSchwan
Copy link
Member

@CarlSchwan CarlSchwan commented Aug 12, 2025

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):

image

After:

image

Checklist

@CarlSchwan CarlSchwan requested review from come-nc, nfebe and sorbaugh and removed request for a team August 12, 2025 22:03
@CarlSchwan CarlSchwan self-assigned this Aug 12, 2025
@CarlSchwan CarlSchwan added the 3. to review Waiting for reviews label Aug 12, 2025
@CarlSchwan CarlSchwan marked this pull request as draft August 12, 2025 22:32
@CarlSchwan CarlSchwan force-pushed the fix-n+1-caldav branch 2 times, most recently from 71ae60e to e4337a5 Compare August 13, 2025 07:41
Copy link
Member

@st3iny st3iny left a 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 🙈

@st3iny

This comment was marked as resolved.

@st3iny
Copy link
Member

st3iny commented Aug 13, 2025

Now we are down around 50% from 244 to 119 queries on PROPFIND remote.php/dav/calendars/admin/.

@CarlSchwan CarlSchwan force-pushed the fix-n+1-caldav branch 2 times, most recently from 3b85792 to c67927a Compare August 13, 2025 11:12
@CarlSchwan CarlSchwan force-pushed the fix-n+1-caldav branch 2 times, most recently from 274cbba to 8c2c149 Compare August 14, 2025 13:20
…ne query

Instead of doing it for each calendar individually.

Signed-off-by: Carl Schwan <[email protected]>
@CarlSchwan CarlSchwan force-pushed the fix-n+1-caldav branch 3 times, most recently from 39f7efd to e77054f Compare August 14, 2025 16:49
Carl Schwan added 3 commits August 15, 2025 09:57
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]>
@icewind1991 icewind1991 merged commit 89fa14f into master Aug 15, 2025
203 of 205 checks passed
@icewind1991 icewind1991 deleted the fix-n+1-caldav branch August 15, 2025 08:56
@skjnldsv skjnldsv mentioned this pull request Aug 19, 2025
@github-actions
Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants