bdefaf00

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

ical-recurrence: keep DTSTART and the limit out of the yearly BySetPos set

@
BYSETPOS operates on
a set of recurrence instances in one interval of the recurrence
rule. [...] A set of recurrence instances starts at the beginning of the
interval defined by the FREQ rule part.
@

@
the BYxxx rule parts
are applied to the current set of evaluated occurrences in the
following order: BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY,
BYHOUR, BYMINUTE, BYSECOND and BYSETPOS; then COUNT and UNTIL are
evaluated.
@

The set is the whole year, starting at the beginning of the year, and
BYSETPOS runs before the recurrence is bounded at all.  So neither
DTSTART nor our limit may narrow the list that filterSetPos numbers.

Move both guards out of that list.  The years are already bounded by
yearlyYearRecurrence and a year holds finitely many candidates, so
dropping the early limit check does not make anything unbounded.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 5s 2s 2s 8s 5s
Eval 8s 12s 12s 21s 0s
Build 20s 0s 13m17s 13m38s 13m16s
Suite 5s 15s 13m32s 13m38s 13m22s

Timeline

0s10s20s