Skip to content

fClaude/improve app loading speed 12n cr#53

Open
Marviel wants to merge 3 commits into
stagingfrom
claude/improve-app-loading-speed-12nCr
Open

fClaude/improve app loading speed 12n cr#53
Marviel wants to merge 3 commits into
stagingfrom
claude/improve-app-loading-speed-12nCr

Conversation

@Marviel
Copy link
Copy Markdown
Contributor

@Marviel Marviel commented Mar 10, 2026

High-level PR Summary

This PR optimizes application loading speed through several strategic improvements: lazy-loading heavy dependencies using Next.js dynamic() imports (VoronoiBackground, ReactFlowProvider, posthog), caching browser timezone lookups to avoid repeated Intl API calls, removing unused dependencies (lodash, useEffectDeepEqual), and adding loading fallbacks to prevent blank screens during initial render. The changes focus on deferring non-critical resources off the critical rendering path while maintaining functionality.

⏱️ Estimated Review Time: 15-30 minutes

💡 Review Order Suggestion
Order File Path
1 apps/next-main/components/ClientOnly.tsx
2 apps/next-main/clientOnly/hooks/useRsnUser.ts
3 apps/next-main/components/_APP/_baseLayout.tsx
4 apps/next-main/app/app/page.page.tsx
5 apps/next-main/app/app/skillsets/[skillSetId]/tree/page.page.tsx

Need help? Join our Discord

claude added 2 commits March 10, 2026 16:29
…ndle size

- Replace blank screen (null) in ClientOnly with a loading spinner so users
  see immediate visual feedback during hydration
- Show themed loading spinner in AppProviderWrapper while Apollo client
  initializes instead of rendering nothing
- Lazy-load PostHog analytics via dynamic import() to remove ~100KB from
  the critical rendering path
- Dynamic import VoronoiBackgroundDefault on home page to defer loading
  the Delaunator geometry library
- Remove unused imports: lodash from _baseLayout and useRsnUser,
  async-mutex from _baseLayout, useEffectDeepEqual from useRsnUser
- Remove three empty useEffectDeepEqual hooks in useRsnUser that ran on
  every state change but only contained commented-out console.debug calls
- Cache browser timezone string at module level to avoid repeated
  Intl.DateTimeFormat() lookups during auth flow

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

vercel Bot commented Mar 10, 2026

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

Project Deployment Actions Updated (UTC)
reasonote Error Error Mar 10, 2026 5:13pm

Request Review

Copy link
Copy Markdown

@recurseml recurseml Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by RecurseML

🔍 Review performed on 97546a8..93af00f

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (5)

apps/next-main/app/app/page.page.tsx
apps/next-main/app/app/skillsets/[skillSetId]/tree/page.page.tsx
apps/next-main/clientOnly/hooks/useRsnUser.ts
apps/next-main/components/ClientOnly.tsx
apps/next-main/components/_APP/_baseLayout.tsx

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