Repository navigation
perf(home): cut home page weight, stream the teaser over HLS and cache media - #51
Merged
maxitect merged 12 commits intoNov 13, 2026
Merged
Conversation
✅ Deploy Preview for clarksbowlingclub ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
maxitect
force-pushed
the
feat/35-performance-home-page-weight-images-caching-and
branch
from
November 13, 2026 00:18
57eadae to
54857da
Compare
maxitect
marked this pull request as ready for review
November 13, 2026 00:18
maxitect
deleted the
feat/35-performance-home-page-weight-images-caching-and
branch
November 13, 2026 00:19
This was referenced Nov 13, 2026
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.
What
Cuts the home page from 16.8 MB to about 1.2 MB before the video (measured locally), streams the hero teaser over an HLS ladder, and gives public media a long cache lifetime. The function region is a Netlify setting and is listed under Notes.
Changes
home.png(14 MB) is a 0.5 MB JPEG;favicon.icogoes from 197 KB to 15 KB.scripts/encode-teaser-hls.sh. Browsers with native HLS (Safari, iOS) use it; others loadhls.jsonly when native HLS is missing; the AV1, HEVC and H.264 files stay as the fallback. Autoplay and poster are unchanged.media-srcallowsblob:for hls.js.fillwithsizes, so phones download a 640 px image instead of 3840 px.netlify.tomlsendsCache-Control: public, max-age=2592000for/videos,/images,/hologramand/svg.Acceptance criteria
/90+, blocking time under 200 ms/tourLCP under 2.5 s, layout shift under 0.1cache-controlon media and/_next/image(AC7)Closes
Closes #35
Notes
eu-central-1, next to the Neon database) under Site configuration > Functions. Adapter-generated functions cannot set it in code, and it needs a redeploy. Region selection may need a paid plan; check before changing./touris left for the re-measurement after Serve Google Sheets content from the server with Cache Components #27, as the ticket says.public/keeps its filenames, so it caches for 30 days rather than a year. Give a replaced file a new name.public/videos/hlsadds 44 MB to the repository (22, 14 and 7 MB per rung). The ladder is encoded from the original 34 MB master, which the script reads from git history (b7ba479^:public/videos/teaser.mp4), not from the H.264 fallback.canPlayTypefor HLS. Safari was not tested.Review
Verdict: ALL CLEAR
Rounds: 2
public/either way and a squash merge keeps the superseded encode offmain. Moving it to object storage is the user's callRe-verified: HLS ladder (browser) PASS: native and hls.js reach 1080p with no console errors or CSP violations; Slow 4G starts at 8.5 s on 480p (production build, same as the author's 8.6 s) · 1080p rung VMAF against the master 92.1 (previously 88.6; the AV1 file scores 78.3), checked by eye at the same frames · Pages look the same (browser) PASS: home with reduced motion and music, 1280 and 390 px, English and French, matching production · rebased onto
mainafter #50 · check.sh PASSEvidence
AC1
AC2
AC3
AC4
AC5
AC6
AC7
Preview playback