Chapter show pages allocate ~21k+ objects per render for large chapters (18% of app allocations)
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
- 55/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- backend, performance
Direzione di ricerca
Start with ChapterController#show and re-measure current 200 responses in the allocations panel or Codebar requests dashboard. Compare the eager-load sets and the shared/sponsors, members/organisers_grid, and shared/newsletter partials, noting that EventCardComponent already fragment-caches. Done means materially lower payload.allocations for 200 responses with subscription forms unchanged for logged-in members.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Issue 2952: Chapter show pages allocate ~21k+ objects per render for large chapters (18% of app allocations)
Summary
ChapterController#show successful renders cost p50 20,880 allocations, p95 70,806 (max 438k) with 15-20 queries per request — 131.7M allocations (18% of app total) over the last 7 days from 4,308 renders. Large-chapter pages (London-style: many upcoming workshops/events) rebuild all public content per view. The 404-probe tail is already handled (#2891/#2907) and is out of scope here: ~1% of allocations.
Measured
7-day window 2026-09-21..27 (canonical logs): 131.7M allocations from 4,308 x 200s; p50 20,880, p95 70,806, max 437,968; 15 queries median, 20 at p95; view p50 11ms. Cost is driven by the controller's eager_load sets (sponsors, organisers, permissions, workshop_host for workshops; venue, sponsors, sponsorships, permissions, organisers for events) plus per-render partials (shared/sponsors, members/organisers_grid, shared/newsletter). Re-measure from current logs or the Codebar requests dashboard (allocations panel) before starting.
The page is public and mostly static. EventCardComponent already fragment-caches itself (used for the event cards); the sponsors and organisers sections do not.
Suggested directions
- HTTP caching for anonymous GETs —
fresh_whenkeyed on[chapter.cache_key_with_version, latest workshop/event cache_key], gated on!logged_in?(the subscriptions partial is per-user). - Fragment-cache the sponsors and organisers sections on the chapter cache key.
- Review the double eager-load sets — up to 20 queries on a cache-cold render suggests some loads are unused by the rendered page.
Verify
payload.allocations p50 for ChapterController#show (200s) drops materially on the allocations panel; no regression for logged-in members (subscription form renders as before).
Related: #2891, #2887, #2888 (same measurement method)
- Lingua principale
- Ruby
- Stelle
- 104
- Fork
- 205
- Merge medio
- 1g 4h
- PR unite (30g)
- 77
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun 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 codebar/planner
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 56/100
I maintainer di solito rispondono entro 1 giorno
-
InvitationManager silently no-ops on non-invitable events/workshops while controllers flash successApertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
refactoring tech debt
Difficoltà 4/5 3-5 giorni Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di codebar/planner
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
TheOdinProject/curriculum#31433 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
stablyai/orca#24145 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
endoflife-date/endoflife.date#11194 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100