Skip to content

Reduce data refresh frequency and clean up code formatting#226

Merged
kevinjosethomas merged 2 commits into
mainfrom
claude/reduce-vercel-costs-oyBK8
Feb 22, 2026
Merged

Reduce data refresh frequency and clean up code formatting#226
kevinjosethomas merged 2 commits into
mainfrom
claude/reduce-vercel-costs-oyBK8

Conversation

@kevinjosethomas
Copy link
Copy Markdown
Collaborator

Summary

This PR reduces the polling frequency for real-time data updates and performs minor code cleanup to improve performance and maintainability.

Key Changes

  • Increased polling intervals: Updated global stats and active users polling from 20 seconds to 5 minutes in HomeHero component to reduce unnecessary API calls
  • Extended cache duration: Increased the active users API cache duration from 1 minute to 5 minutes to align with the new polling frequency
  • Removed unused server-side props: Deleted empty getServerSideProps export from the Turing page
  • Code formatting improvements:
    • Reformatted dependency array in useAnalysisController hook for consistency
    • Simplified ternary operator formatting in PlaySetupModal
    • Reordered className attributes in GameBoard for better readability

Implementation Details

The polling interval changes reduce the frequency of API requests while maintaining reasonable data freshness. The 5-minute interval is more appropriate for metrics like global stats and active user counts that don't require real-time updates. The cache duration adjustment ensures the API endpoint respects the same refresh cadence.

https://claude.ai/code/session_01UGfnsFfXcafbYbt2TuFUVq

- Change homepage polling intervals from 20s to 5min for both
  active users and global stats
- Increase active-users API server-side cache from 1min to 5min
- Remove getServerSideProps from turing page to eliminate SSR

https://claude.ai/code/session_01UGfnsFfXcafbYbt2TuFUVq
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
maia-platform-frontend Ready Ready Preview, Comment Feb 22, 2026 0:07am

Request Review

@kevinjosethomas kevinjosethomas merged commit 6b23e5f into main Feb 22, 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.

2 participants