Skip to content

feat(#914): cache RelativeTimeFormat instance in intlCache, use in da… - #1110

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Topmatrixmor2014:issue-914-relative-time-cache
Jul 30, 2026
Merged

feat(#914): cache RelativeTimeFormat instance in intlCache, use in da…#1110
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Topmatrixmor2014:issue-914-relative-time-cache

Conversation

@Topmatrixmor2014

Copy link
Copy Markdown

…teUtils.formatRelative

Add getRelativeTimeFormat to intlCache.ts following the same caching pattern as getDateTimeFormat/getNumberFormat. Update formatRelative in dateUtils.ts to use the cached instance instead of constructing new Intl.RelativeTimeFormat per call. This eliminates unnecessary formatter recreation in relative-timestamp-heavy views (feeds, notifications, activity logs).

Description

Brief description of changes

Related Issue

Closes #

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No console errors
  • Uses Lucide icons consistently
  • Responsive design implemented
  • Starknet best practices followed

Closes #914

…use in dateUtils.formatRelative

Add getRelativeTimeFormat to intlCache.ts following the same caching pattern as getDateTimeFormat/getNumberFormat. Update formatRelative in dateUtils.ts to use the cached instance instead of constructing new Intl.RelativeTimeFormat per call. This eliminates unnecessary formatter recreation in relative-timestamp-heavy views (feeds, notifications, activity logs).
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@Topmatrixmor2014 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 534ecac into rinafcode:main Jul 30, 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.

Cache the RelativeTimeFormat instance in dateUtils.formatRelative

3 participants