Chapter show pages allocate ~21k+ objects per render for large chapters (18% of app allocations)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Refactoring
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Bereich
- backend, performance
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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)
- Vorherrschende Sprache
- Ruby
- Sterne
- 106
- Forks
- 208
- Ø Merge
- 19 Std. 31 Min.
- Gemergte PRs (30 T.)
- 84
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus codebar/planner
-
DashboardQuery eager-loads workshop_host with :sponsors in one join (same host-loss trap as #2975)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Dual Invitiation issueEvtl. vergeben @mroderick hat das vor 7 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 42/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 28/100
codebar/planner#3008 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in codebar/planner
Ähnliche Issues
-
Lint/NoReturnInMemoization flags `return` in local variable `||=` and `&&=` assignmentsEvtl. vergeben @RaphaelFakhri hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Shopify/ruby-style-guide#815 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
zerocracy/judges-action#2849 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
bigbluebutton/bigbluebutton#26166 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
TarteelAI/quranic-universal-library#916 ·
Maintainer antworten meist innerhalb von 1 Tag
-
good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag