Skip to content

Performance: home page weight, images, caching and function region #35

Closed

Description

@maxitect

Performance audit run on 11 November 2026 with Lighthouse (mobile) against production. The teaser video and missing metadataBase are in #31; serving content from the server instead of fetching it in the browser is #27. This ticket covers the rest.

Page Performance LCP Blocking time Layout shift Page weight
/ 73 3.3 s 580 ms 0 16,800 KB
/tour 80 4.7 s 10 ms 0.107 416 KB

Accessibility and SEO score 100 on both.

Deliverables

Home page

  • SpinningLogo imports all of three.js statically (src/app/_components/HomeClient.tsx:6), a 540 KB chunk that causes most of the 580 ms blocking time. Load it after the page is interactive, and not at all when reduced motion is on
  • The four hologram textures in public/hologram/ are PNGs of 182 to 316 KB each, about 1 MB together. Convert to WebP or AVIF
  • The animation loop keeps running when the tab is hidden (SpinningLogo.tsx:174); pause it
  • public/images/home.png is 14 MB. It goes through the image optimiser, but the source should be a JPEG of a few hundred KB

Every page

  • Functions run in us-east-2 (Ohio) while the audience is in France; the home document took 630 ms to respond. Move the functions region to Europe
  • Files in public/ are served with cache-control: max-age=0, must-revalidate, including the 34 MB video. Give versioned media a long cache lifetime
  • The carousel on the About page declares images as 5000 by 500 (src/components/ui/Carousel.tsx:84-85) with no sizes, so phones download desktop-sized images from sources of 0.9 to 2 MB. Set real dimensions and sizes
  • src/app/favicon.ico is 197 KB; icon.svg already exists
  • The Jost font loads nine weights in normal and italic (src/app/layout.tsx:18-24); load only the weights the site uses
  • Spotify sets loading="lazy" on its iframe; YouTube and Bandcamp do not (src/app/music/_components/)

After #27

Acceptance criteria

  • Lighthouse mobile on production, recorded in this issue before and after: / performance 90 or more with blocking time under 200 ms; /tour LCP under 2.5 s and layout shift under 0.1
  • The home page transfers under 3 MB before the video starts
  • The spinning logo still appears and animates on desktop and mobile, and is absent with reduced motion on
  • The home document responds in under 300 ms from a European location
  • A repeat visit loads images and video from the browser cache
  • All pages look the same as before on desktop and mobile

Depends on

#27, #31

Activity

  1. maxitect commented on Nov 12, 2026

    @maxitect
    ContributorAuthor

    Adaptive streaming for the home page teaser (decided 12 November 2026)

    #31 (PR #45) re-encodes the teaser at full 1920x818 in three files: AV1 (7.3 MB), HEVC (7.5 MB) for Apple devices without AV1, and an H.264 fallback (26.6 MB). It autoplays as the home page hero and stays that way.

    Add HLS on top of that so slow connections start quickly at a lower quality and step up as bandwidth allows:

    • A multi-bitrate ladder (for example 480p, 720p and 1080p) with an HLS playlist, produced by a committed encode script
    • Safari and iOS play HLS natively; other browsers use hls.js, loaded only where native HLS is missing
    • Autoplay, the poster and the current quality at full bandwidth are unchanged
    • Acceptance: on a throttled "Slow 4G" profile the video starts within a few seconds at a lower rung; on a fast connection it reaches the 1080p rung
  2. self-assigned this
    on Nov 12, 2026
  3. maxitect commented on Nov 13, 2026

    @maxitect
    ContributorAuthor

    Lighthouse, before (production, mobile)

    Home page https://clarksbowlingclub.com/, run 2026-11-13 00:17 UTC with Lighthouse 12.8.2 (default mobile emulation, headless Chrome), before PR #51 merges. Production at this point includes #31 (AV1/HEVC teaser), #33 (Payload), #34 (CSP) and #29 (calendar).

    Metric Value
    Performance 85
    First Contentful Paint 1.5 s
    Largest Contentful Paint 3.7 s
    Total Blocking Time 20 ms
    Cumulative Layout Shift 0
    Speed Index 5.1 s
    Total page weight 4,778 KiB
    Server response (root document) 20 ms

    The run right after #31 scored 90 with LCP 3.1 s; single Lighthouse runs vary by a few points. The "after" run follows once #51 deploys.

  4. maxitect commented on Nov 13, 2026

    @maxitect
    ContributorAuthor

    Lighthouse, after (production, mobile)

    Run 2026-11-13 00:21 UTC, Lighthouse 12.8.2, default mobile emulation, after PR #51 deployed (19acbc6).

    Metric Before (#51) After
    Performance 85 85
    First Contentful Paint 1.5 s 1.4 s
    Largest Contentful Paint 3.7 s 3.7 s
    Total Blocking Time 20 ms 10 ms
    Cumulative Layout Shift 0 0
    Speed Index 5.1 s 4.9 s
    Total page weight 4,778 KiB 5,069 KiB

    The criterion "90+ on production" is not met. The local production build scored 93, but production stays at 85.

    • The LCP element is a text <span>, not the video or an image, so the image and three.js changes don't move it.
    • Most of the page weight is HLS segments: Lighthouse's emulated connection is fast enough for the player to pick the 1080p rung (five segments, about 4 MB).
    • The function region is still the default (Ohio), pending the Netlify setting in the PR body.

    The next thing to look at is the render delay of the LCP text (font loading for the hero text) once the region is moved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions