src/recur.c: Speed up recur_item_find_occurrence()
Bail out early if we check for a date beyond the item's repetition end date. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
2bf0249338
commit
9aa9fde504
@ -636,6 +636,9 @@ recur_item_find_occurrence (long item_start, long item_dur, llist_t *item_exc,
|
||||
if (day_start < item_start - DAYINSEC + 1)
|
||||
return 0;
|
||||
|
||||
if (rpt_until != 0 && day_start >= rpt_until + item_dur)
|
||||
return 0;
|
||||
|
||||
t = day_start;
|
||||
lt_day = *localtime (&t);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user