Skip to content

fix: eliminate N+1 dashboard metrics API requests - #3321

Open
Arryan21-06 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
Arryan21-06:fix/dashboard-metrics-aggregation
Open

fix: eliminate N+1 dashboard metrics API requests#3321
Arryan21-06 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
Arryan21-06:fix/dashboard-metrics-aggregation

Conversation

@Arryan21-06

Copy link
Copy Markdown

Summary

Closes #2395

What Changed

  • Centralized dashboard metrics fetching.
  • Added a shared DashboardMetricsContext for dashboard widgets.
  • Replaced multiple independent client-side metric requests with a single aggregated metrics request.
  • Added a consolidated /api/metrics endpoint.
  • Updated dashboard components to consume shared metrics instead of fetching independently.
  • Reduced redundant API calls and improved dashboard loading performance.

Benefits

  • Eliminates the N+1 API request pattern.
  • Reduces GitHub API usage and rate-limit risk.
  • Provides a more consistent loading experience.
  • Improves dashboard scalability and maintainability.

Testing

  • Dashboard loads successfully.
  • Verified dashboard metrics render correctly.
  • Confirmed consolidated metrics fetching.
  • Existing dashboard functionality remains intact.

@github-actions github-actions Bot added type:bug GSSoC type bonus: bug fix type:feature GSSoC type bonus: new feature type:design GSSoC type bonus: UI/design (+10 pts) type:performance GSSoC type bonus: performance (+15 pts) gssoc26 GSSoC 2026 contribution labels Jul 31, 2026
@github-actions

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:design GSSoC type bonus: UI/design (+10 pts) type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] [PERF] Refactor dashboard data fetching to eliminate N+1 API requests

1 participant