Skip to content

chore: Next.js dev performance tuning and code cleanup#11

Merged
jpcmf merged 1 commit intoimprovements/nextjs-cpu-tuningfrom
copilot/sub-pr-10
Mar 17, 2026
Merged

chore: Next.js dev performance tuning and code cleanup#11
jpcmf merged 1 commit intoimprovements/nextjs-cpu-tuningfrom
copilot/sub-pr-10

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

Reduces dev server CPU/memory overhead and improves runtime render efficiency, alongside Tailwind and formatting hygiene.

Performance

  • Turbopack: Enabled via next.config.ts — replaces Webpack in dev, significantly faster HMR and cold builds
  • onDemandEntries: Caps in-memory page buffer (pagesBufferLength: 5, maxInactiveAge: 60s) to reduce idle memory pressure during dev
  • Toggle memoization: Wrapped with React.memo to skip re-renders on unchanged props
  • Font: Added display: "swap" to JetBrains Mono for better LCP/CLS; preload: true made explicit

Code quality

  • Replaced inline style={{ width/height }} props in page.tsx with Tailwind utilities (h-10, h-12, w-[70px], etc.)
  • Biome-compliant reformats across BadgeStatus.tsx, examples/page.tsx, layout.tsx, and page.tsx
  • Updated pnpm-lock.yaml for dependency bumps
// next.config.ts
const nextConfig: NextConfig = {
  onDemandEntries: { maxInactiveAge: 60 * 1000, pagesBufferLength: 5 },
  turbopack: { resolveAlias: {} },
}

Note: onDemandEntries was deprecated in Next.js 15 and may be a no-op at ^16.1.6.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI changed the title [WIP] Update improvements for Next.js CPU tuning chore: Next.js dev performance tuning and code cleanup Mar 17, 2026
Copilot AI requested a review from jpcmf March 17, 2026 01:56
@jpcmf jpcmf marked this pull request as ready for review March 17, 2026 02:05
@jpcmf jpcmf merged commit b3ed81d into improvements/nextjs-cpu-tuning Mar 17, 2026
1 check passed
@jpcmf jpcmf deleted the copilot/sub-pr-10 branch March 17, 2026 02:11
jpcmf added a commit that referenced this pull request Apr 7, 2026
chore: Next.js dev performance tuning and code cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants