improvement(knowledge): react-doctor perf pass across the knowledge base module#5332
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview React render paths: Memoizes unstable lists so downstream hooks stop thrashing— notably Server components: Knowledge base and document pages now Docs: Adds a “Run independent awaits in parallel” section to Reviewed by Cursor Bugbot for commit acd8d97. Configure here. |
Greptile SummaryA focused performance pass over the Knowledge Base module guided by
Confidence Score: 5/5All changes are behaviour-preserving refactors with no logic path alterations; safe to merge. Every change either tightens a memo dependency array, removes a redundant allocation, or replaces a multi-pass chain with a single pass — none touch control flow or data mutations. The one dep-array entry that was widened ( document.tsx — the Important Files Changed
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/sta..." | Re-trigger Greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit fc69761. Configure here.
…doctor # Conflicts: # .claude/rules/sim-react-performance.md
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit acd8d97. Configure here.
Summary
react-doctor— findings 95 → 69, clearing every JS-perf, async, lazy-ref, and module-scope category and fixing thedisplayChunksexhaustive-depscluster.displayChunksindocument.tsx,requiredScopesinconnectors-section).cooldownTimersSet ref instead of allocating a new Set every render.buildUploadedFilehelper to module scope so it isn't rebuilt per render.filter().map()/map().filter(Boolean)chains into singlereduce/flatMappasses.find()-in-a-loop withMaplookups (O(n²) → O(n)).[...arr].sort()→arr.toSorted(); parallelize independent server-component awaits withPromise.all.sim-react-performancerule (.claude+.cursor) documenting these patterns for future work.All changes are behavior-preserving; the risky architectural refactors react-doctor also flags (god-component splits,
useReducerconversions, prop-callback rearchitecture) were intentionally left out of scope.Type of Change
Testing
tsc --noEmit: 0 errors;biome check: clean.Checklist