perf: site performance optimization#8
Open
Xixn2 wants to merge 1 commit into
Open
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #7
Changes
Bundle & Load
CustomCursoris now lazy-loaded viaClientCursorwrapper withssr: false— the heavy animation component is excluded from the initial JS bundle and hydration payloadScroll & Animation
AnimateIn:transition: { duration: 0 }when out of view → instant reset, no reverse animation on scroll-upRevealText: same instant-exit patternHeader.NavLinkwrapped withReact.memo— prevents re-renders on unrelated state changesGPU Compositing
Heroorbs:willChange: 'transform, opacity'— browser promotes layers before animation startsGameCard3D tilt container:willChange: 'transform'backdropFilteron header gradient always applied (no toggling) — eliminates style recalculation on every scroll eventTest plan
npm run build✅