Image fetch and display optimization on the landing page (LCP 404 ms → poster priority, sizing, caching)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- html, javascript
- Ambito
- frontend, performance
Direzione di ricerca
Start in website/site/src/components/FilmScreen.astro where the hero video poster and attributes are set, then check Base.astro for a possible preload and the inline module in the built index.html. Caching needs a new website/site/public/_headers file and wrangler.jsonc, and the poster resizing belongs in the pnpm run media pipeline under website/hero-animation/. Done means the acceptance checklist holds: High poster priority in DevTools, a smaller poster on a 1318×741 viewport, Cache-Control on /media/*, and LCP under 300 ms.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
LCP analysis of ema.tnsor.network (measured 2026-10-16): LCP is the hero <video>'s poster frame (/media/hero-poster.webp), landing at 404 ms with a 312 ms render delay after the image finishes downloading (~92 ms). Full diagnostics:
| Metric / Attribute | Value | Finding |
|---|---|---|
| LCP Timing | 404 ms | Total render delay is 312 ms. |
| Image Priority | Medium | Failed fetchpriority=high check. |
| Resolution | 1920×1080 | Oversized for the 1318×741 display area. |
| Potential savings | 39.1 KB | Oversized resolution wastes bytes. |
| Cache policy | max-age=0 |
Forces re-validation on every request. |
Render delay breaks down to a ~205 ms layout task plus script execution (line 19, col 5131 — inline module in the built index.html) competing with the poster's first paint.
Current markup (FilmScreen.astro)
<video muted loop playsinline preload="auto" poster={poster} data-autoplay data-low-src={lowSrc} aria-label={title}>
No fetchpriority, no responsive source, and Cloudflare Workers static assets currently emit no cache headers (no _headers file; wrangler.jsonc assets.directory only).
Recommendations
- Elevate resource priority —
fetchpriority="high"on the video (applies to the poster fetch). Optionally add a<link rel="preload" as="image">for the poster inBase.astrowhen the hero is above the fold. - Responsive sizing — the poster is 1920×1080 but the display area measured 1318×741. Serve a smaller default with
srcset/<picture>(e.g. 960/1318/1920 widths), or accept the ~39 KB penalty on desktop. Note the poster doubles as theog:image, so generate both variants from the same source inpnpm run media. - Minimize main-thread work — the ~205 ms layout task + inline script at first paint delay the render even after the bytes arrive. Audit the initial inline module (spark canvas init, IntersectionObserver setup, reveal class) for anything that can yield or move behind
requestIdleCallback. - Improve caching — static assets are content-hashed only in name (they aren't —
hero-poster.webphas no hash). Add awebsite/site/public/_headersfile (Cloudflare Pages syntax works with Workers static assets) mapping/media/*to a longmax-age+immutable, or hash filenames. Careful:hero.mp4changes with each hero re-render, so prefer_headerswith a boundedmax-age(e.g. 1 week) overimmutableunless filenames get hashed.
<!-- Example: adding fetchpriority to a video poster -->
<video poster="/media/hero-poster.webp" fetchpriority="high">
<!-- ... -->
</video>
Note: findings above were identified on a live page in DevTools. Adapt to the stack (Astro components in website/site/src/components/FilmScreen.astro, build pipeline in website/hero-animation/) rather than applying literal CSS overrides.
Acceptance
- Poster fetch reports
Highpriority in DevTools network - Poster transfer ≤ 1318×741-equivalent size on that viewport (or documented decision to keep 1080p for large screens)
-
_headersserving/media/*withCache-Control: public, max-age≥604800(verified withcurl -sI https://ema.tnsor.network/media/hero-poster.webp | grep -i cache) - LCP re-measured with the same methodology; target < 300 ms
- Lingua principale
- TypeScript
- Stelle
- 829
- Fork
- 234
- Merge medio
- 18h 43m
- PR unite (30g)
- 67
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cameri/nostream
-
Website
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Replace the community relay-setup guides with a first-party step-by-step guide on the websiteApertadocumentation Website
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
-
fix(website): update operator console film with fresh notifications screenshotForse già presa @Ferryx349 l’ha presa oggi. Apertabug Website
cameri/nostream#893 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cameri/nostream
Issue simili
-
bug priority: P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
wayfinder:task
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
bug customer-reported data-plane question Service Attention Storage
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
Azure/azure-rest-api-specs#47397 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Claude thinking budget can shrink capped Haiku responses to 2,048 tokensForse già presa @DavyMassoneto l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
diegosouzapw/OmniRoute#17109 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
paperclipai/paperclip#16785 ·
I maintainer di solito rispondono entro 1 giorno