-
Notifications
You must be signed in to change notification settings - Fork 125
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
Optimize detection of endless rule iterations #581
Comments
I noticed old PR #416 - that might have some ideas for catching these things without looping all the way to year 9999? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#564 (comment)
There are cases when a rule specifies a combination that never happens in the calendar. If the RRuleIterator is being asked to generate some occurrences of the event, then it loops. We currently stop those by "brute force" - when the loop gets to 9999-12-31 we exit.
If we analyse the request, we should be able to detect request patterns that will never match any actual calendar dates, and return quickly with just the first date of the event and no recurrences. That would save looping through days/months/years all the way to 9999.
The text was updated successfully, but these errors were encountered: