perf(ui): look up cycle/module names via maps on the issue list#371
perf(ui): look up cycle/module names via maps on the issue list#371cavidelizade wants to merge 1 commit into
Conversation
cycleName/moduleName did a linear cycles.find / modules.find for every row, and they're called a few times per row, so a large list was O(rows x cycles) every render. Build id -> name maps once per render and look up in O(1). This is a focused slice of Devlaner#345; the broader row/card memoization it describes is a larger change left for a follow-up. Refs Devlaner#345 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 31 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
cycleName/moduleNameon the work-item list did a linearcycles.find/modules.findfor every row, and they're called a few times per row, so a large list was O(rows x cycles) per render.Linked issues
Refs #345 (a focused slice)
Type of change
perf:)Surface
apps/web/)What changed
Build
id -> namemaps once per render and look up in O(1), the same pattern the file already uses forstateById/labelById. Plainconstrather thanuseMemobecause this sits after the component's early returns.Scope note
Issue #345 is broader (memoizing the Row/Card components and lifting drag/resize state out of the row subtree so the whole list doesn't re-render on hover/resize). That's a larger, riskier change I've left for a separate PR; this one is the safe, self-contained slice.
Test plan
npm run typecheck+npm run lintpassAI assistance
Claude Code (Opus 4.8), commits carry aCo-Authored-By:trailer