Chapter show pages allocate ~21k+ objects per render for large chapters (18% of app allocations)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend, performance
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- Ruby
- Star
- 104
- Fork
- 205
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 77
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codebar/planner
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Workshop show pages allocate ~7.3k objects per request with no caching (28% of app allocations)Đang mởperformance
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
InvitationManager silently no-ops on non-invitable events/workshops while controllers flash successĐang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codebar/planner
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
jetrockets/jet_ui#47 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
FreeCAD/homebrew-freecad#870 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Messages with a markdown image that has a relative or malformed URL throw TypeError: Invalid URLĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày