8e31734e

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

Committer: Tom Sydney Kerckhove <NorfairKing@users.noreply.github.com>

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 2m36s 0s 0s 2m37s 2m36s
Eval 2m49s 12s 12s 3m01s 12s
Build 3m01s 6m15s 39m44s 42m45s 37m37s
Suite 2m36s 6m28s 40m08s 42m45s 40m26s

Timeline

0s2m50s3m40m40s40m50s41m41m10s41m20s41m30s41m40s41m50s42m42m10s42m20s42m30s42m40s