Skip to content

Fix recurrence engine performance (19-907x slower than rrule) #40

@thedhanawada

Description

@thedhanawada

Problem

Benchmark data shows forceCalendar's recurrence engine is 19-907x slower than the rrule library. This is unacceptable for an enterprise calendar.

Key Bottlenecks to Investigate

  • findDSTTransitions checks every day in the range (should binary search)
  • Occurrence expansion may be recalculating timezone offsets unnecessarily
  • Cache hit rates should be measured and optimized
  • The 100-entry LRU cache for expanded occurrences may be too small

Benchmark Results (current)

  • Daily recurrence: 19x slower
  • Weekly with BYDAY: 907x slower
  • Monthly: 40x slower

Target

Within 5x of rrule for all patterns, ideally within 2x.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions