React & Next.js Performance Review Rules
Prioritized review rules to audit branches for performance regressions.
Severity Classification
P0 (Critical — Must Fix Before Merge)
- Sequential Waterfalls: Unnecessary chained
awaitstatements in server components or route handlers that could be parallelized withPromise.all(). - Accidental De-opt of Server Components: Adding
'use client'to layout roots or high-level containers instead of leaf nodes. - Unbounded Client-Side Lists: Rendering dynamic lists with 100+ items without virtualization or pagination.
- Missing Memoization on Expensive Render Trees: Passing new inline functions/objects as props to expensive or memoized child subtrees.
P1 (High Impact — Strong Recommendation)
- Massive Barrel Imports: Importing icons or utilities from index barrel files that bypass bundler tree-shaking.
- Synchronous Heavy Operations in Route Handlers: Missing
after()for non-critical side effects (audit logging, telemetry) in Next.js 15. - Uncached Cacheable Fetches in Next.js 15: Relying on legacy Next.js 14 caching assumptions without explicit
revalidateorcache: 'force-cache'. - Derived State Synced via
useEffect: Storing computed values inuseStateand setting them inuseEffectinstead of calculating inline during render.
P2 (Medium / Polish)
- Missing
next/imagedimensions / priority: Hero images missingprioritycausing LCP delay. - Unoptimized Third-Party Scripts: Analytics or chat widgets loaded eagerly rather than
lazyOnload.