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

perf(dav): skip non-calendar requests in webcal caching plugin #44511

Merged

Conversation

kesselb
Copy link
Contributor

@kesselb kesselb commented Mar 27, 2024

Summary

The webcal caching plugin is active when the X-NC-CalDAV-Webcal-Caching header is there.

findPrincipalByUrl sends a request for /remote.php/dav/principals/users/admin/ using the caldavService which sets the header by default.1

As X-NC-CalDAV-Webcal-Caching only impacts calendar requests, we can skip non-calendar requests.

TODO

  • CI
  • Review

Checklist

Footnotes

  1. https://github.com/nextcloud/calendar/blob/b3670f1805ef9ef952d6abe4e5334e37b5a14133/src/services/caldavService.js#L43

The webcal caching plugin is active when the X-NC-CalDAV-Webcal-Caching header is there.

findPrincipalByUrl sends a request for /remote.php/dav/principals/users/admin/ using the caldavService which sets the header by default.[^1]

As X-NC-CalDAV-Webcal-Caching only impacts calendar requests, we can skip non-calendar requests.

[^1]: https://github.com/nextcloud/calendar/blob/b3670f1805ef9ef952d6abe4e5334e37b5a14133/src/services/caldavService.js#L43

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb added 3. to review Waiting for reviews performance 🚀 labels Mar 27, 2024
@kesselb kesselb added this to the Nextcloud 29 milestone Mar 27, 2024
@kesselb kesselb self-assigned this Mar 27, 2024
@skjnldsv skjnldsv mentioned this pull request Mar 28, 2024
81 tasks
@kesselb kesselb modified the milestones: Nextcloud 29, Nextcloud 30 Mar 28, 2024
@kesselb kesselb merged commit c0d21b4 into master Apr 3, 2024
165 of 167 checks passed
@kesselb kesselb deleted the perf/noid/skip-tree-lookup-for-non-calendar-requests branch April 3, 2024 05:44
@blizzz blizzz mentioned this pull request Jul 24, 2024
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.

3 participants