perf(marketing): improve mobile Lighthouse score from 42 to 90#1148
Conversation
- Dynamic import below-fold sections (Video, TrustedBy, Features, WallOfLove, FAQ, CTA) - Remove Three.js ShaderAnimation from hero (was opacity 0.01, drops ~600 KiB) - Disable PostHog session recording on marketing (saves ~88 KiB) - Defer Tally script from afterInteractive to lazyOnload - Remove priority/eager from below-fold images (TrustedBy logos, video thumbnail) - Add optimizePackageImports for framer-motion, react-icons, lucide-react
📝 WalkthroughWalkthroughThis PR optimizes the marketing site's performance and UX through multiple targeted adjustments: removing a shader animation component, converting static component imports to lazy-loaded dynamic imports for below-the-fold sections, removing image loading priority flags, adjusting script load timing, disabling session recording in analytics, improving accessibility, and refining button spacing. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
next/dynamic, code-splitting ~304 KiB of unused JS out of the initial bundledisable_session_recording: trueprevents loading ~88 KiB ofposthog-recorder.jsafterInteractivetolazyOnloadto keep it off the critical pathpriority+loading="eager"despite being below the fold on mobile. Video thumbnail also hadpriorityunnecessarily.optimizePackageImports— Tree-shakes barrel exports fromframer-motion,react-icons,lucide-reactResults (Lighthouse mobile, production build)
Test plan
bun run lint— cleanbun run typecheck --filter=@superset/marketing— passesbun test— 1193 pass, 0 failSummary by CodeRabbit
Release Notes
Performance
Accessibility
Visual Updates
Privacy