Skip to content

perf: site performance optimization#8

Open
Xixn2 wants to merge 1 commit into
developfrom
perf/site-optimization
Open

perf: site performance optimization#8
Xixn2 wants to merge 1 commit into
developfrom
perf/site-optimization

Conversation

@Xixn2

@Xixn2 Xixn2 commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #7

Changes

Bundle & Load

  • CustomCursor is now lazy-loaded via ClientCursor wrapper with ssr: false — the heavy animation component is excluded from the initial JS bundle and hydration payload

Scroll & Animation

  • AnimateIn: transition: { duration: 0 } when out of view → instant reset, no reverse animation on scroll-up
  • RevealText: same instant-exit pattern
  • Header.NavLink wrapped with React.memo — prevents re-renders on unrelated state changes

GPU Compositing

  • Hero orbs: willChange: 'transform, opacity' — browser promotes layers before animation starts
  • GameCard 3D tilt container: willChange: 'transform'
  • Hero particles: reduced from 65 → 40 (still visually dense, lower animation overhead)
  • backdropFilter on header gradient always applied (no toggling) — eliminates style recalculation on every scroll event

Test plan

  • Build passes: npm run build
  • Initial page load feels faster (no cursor script blocking)
  • Scroll up → no reverse animation (elements snap back instantly)
  • Header gradient + blur renders smoothly during scroll
  • Game cards tilt without jank on hover

- CustomCursor: lazy-load via dynamic import (ssr: false) through ClientCursor wrapper — removes heavy animation component from initial bundle
- Header: backdropFilter always applied (no toggle) — eliminates style recalc on scroll; memoize NavLink with memo()
- Hero: reduce particles 65 → 40; add willChange: 'transform, opacity' to orbs
- GameCard: add willChange: 'transform' to 3D tilt container
- AnimateIn: instant exit (duration: 0) when element leaves viewport — no reverse animation on scroll-up
- RevealText: same instant-exit pattern
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.

perf: site performance optimization

1 participant