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

Fetch repeated events more efficiently #148

Closed
maxpatiiuk opened this issue Dec 14, 2022 · 1 comment
Closed

Fetch repeated events more efficiently #148

maxpatiiuk opened this issue Dec 14, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@maxpatiiuk
Copy link
Owner

maxpatiiuk commented Dec 14, 2022

When fetching events, call with singleEvents: false (see https://developers.google.com/calendar/api/v3/reference/events/list)

This way, instead of sending each instance of a repeated event, Google Calendar will send the rules on how the event repeats

This will potentially reduce the response size by a lot when fetching over large periods (i.e, a year)

@maxpatiiuk maxpatiiuk added the enhancement New feature or request label Dec 14, 2022
@maxpatiiuk
Copy link
Owner Author

Doing testing showed that singleEvents: false is actually returning a larger response then singleEvents: true because it also includes canceled events.
That, in addition to the added burden of having to infer the instances of the events based on the recurrence rule makes singleEvents: false totally not useful.

As a quick test, I fetched all events for my KU Homework calendar for the entire year of 2022, and there are only 590 entries with singleEvents: true - and the response was returned in 0.5 seconds. In comparison, singleEvents: false returned 609 entries and also took 0.5 seconds.

This shows that fetching for the entire year is practical even without singleEvents: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant