Skip to content

perf(calendar): memoize recurring-event expansion (#982)#992

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
DTriple-p:feat/memoize-recurring-events
Jul 23, 2026
Merged

perf(calendar): memoize recurring-event expansion (#982)#992
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
DTriple-p:feat/memoize-recurring-events

Conversation

@DTriple-p

Copy link
Copy Markdown
Contributor

Summary

Fixes #982: Memoizes recurring-event expansion in Calendar.tsx.

Context & Changes

Previously, events.flatMap(expandRecurring) was executed on every component render. Because expandRecurring performs up to 52 iterations per event, re-running this logic repeatedly was producing a new array instance identity on every render. This forced react-big-calendar to unnecessarily re-process events.

  • Wrapped events.flatMap(expandRecurring) inside useMemo, with a dependency array keyed on events.

Verification

  • Verified that recurring event expansion only recalculates when events changes.
  • Checked TypeScript types and component structure.

@drips-wave

drips-wave Bot commented Jul 23, 2026

Copy link
Copy Markdown

@DTriple-p Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit 3b0ffc2 into rinafcode:main Jul 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memoize recurring-event expansion in Calendar

2 participants