-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix potential exrule out-of-memory in RRuleSetIter
When exrules are used the exdates btree will eventually cause out of memory since it's always appended to but never drained. Fix is to stop adding to the btree, make the the exrule iterators peekable and only step an iterator when the compared date is greater than the peeked date. The fix assumes that the date given to 'is_date_excluded' is never earlier than the date of the last call. It's still allowed to be called with the same date as last call though. Also the exdates has been made a sorted Vec of dates which are popped whenever the compared date is greater than the last (earliest) date.
- Loading branch information
Showing
1 changed file
with
49 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters