Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Chapter show pages allocate ~21k+ objects per render for large chapters (18% of app allocations)

クローズ
#2,952 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rails, ruby

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

performance

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

  1. HTTP caching for anonymous GETs — fresh_when keyed on [chapter.cache_key_with_version, latest workshop/event cache_key], gated on !logged_in? (the subscriptions partial is per-user).
  2. Fragment-cache the sponsors and organisers sections on the chapter cache key.
  3. 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)

主要言語
Ruby
スター
104
フォーク
205
平均マージ
1日 2時間
マージ済み PR(30日)
77

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codebar/planner のほかの issue

codebar/planner の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。