Skip to content

perf: reduce dev compile times#24

Merged
JLRansom merged 1 commit into
masterfrom
perf/reduce-compile-times
Mar 18, 2026
Merged

perf: reduce dev compile times#24
JLRansom merged 1 commit into
masterfrom
perf/reduce-compile-times

Conversation

@JLRansom
Copy link
Copy Markdown
Owner

Summary

  • Fix double analytics fetch (AnalyticsPanel.tsx): Replace cancelled boolean flag with AbortController so React StrictMode's double-invocation of useEffect aborts the first in-flight request instead of sending two parallel HTTP calls.
  • Lazy-load recharts (AnalyticsCharts.tsx + AnalyticsPanel.tsx): Extract all five chart blocks (BarChart, LineChart, AreaChart, and the meetings chart) into a new AnalyticsCharts component loaded via next/dynamic with ssr: false. Recharts is now excluded from the initial bundle and compiled only when the charts pane is first rendered.
  • Add loading skeletons to dynamic boundaries (MeetingsPanelLoader.tsx, MeetingView.tsx): Add loading fallback UI to the existing dynamic() calls for MeetingsPanel and MeetingScene so users see a placeholder immediately instead of a blank area during chunk download.

Test plan

  • Visit a project analytics page — charts render correctly after data loads
  • Switch time range — only one fetch fires (verify in Network tab; no duplicate requests)
  • Navigate to Meetings panel — loading skeleton shows briefly before panel appears
  • Open a meeting — "Loading scene…" placeholder shows while Three.js chunk loads
  • npx tsc --noEmit passes with no new type errors

🤖 Generated with Claude Code

…ller

- Replace cancelled-boolean fetch pattern in AnalyticsPanel with AbortController to prevent double fetches in React StrictMode
- Extract all recharts chart blocks into a new AnalyticsCharts.tsx component loaded via next/dynamic with ssr:false, keeping recharts out of the initial bundle
- Add loading skeletons to MeetingsPanelLoader and MeetingView dynamic import boundaries

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@JLRansom JLRansom merged commit 4103ff7 into master Mar 18, 2026
2 checks passed
@JLRansom JLRansom deleted the perf/reduce-compile-times branch March 18, 2026 00:47
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.

1 participant