Unbelievably slow during development 60-120 second per page
Unanswered
Producdevity posted this in #help-forum
Our Next.js v15 project compiles extremely slowly in development, often 60 s to 2 min per page load—while production builds run quickly. Simple Prisma queries in development can also take ~12 s but are instant in production. This happens on multiple high‑spec machines (macOS and Windows), both with and without Docker.
Current setup
• next dev --turbopack with experimental options like optimizePackageImports and custom Turbopack rules.
• Prisma connects to a PostgreSQL database (tried both a remote Supabase instance and a local DB in Docker).
• The (docker) dev container runs prisma migrate deploy and seeds the DB on first run.
• Tailwind removed for testing; pages with and without images show the same slowness.
What we tried
1. Running the app outside Docker and inside Docker—no noticeable difference.
2. Disabling Turbopack
3. Try experimental flags like
4. Using local vs. remote PostgreSQL and toggling Prisma debug logs. The same remote db that is snappy in production takes up to 12 seconds for simple queries in development.
5. Removing Tailwind by not importing
6. Using a DB with a handful of items instead of hundreds, no difference.
7. Tried running it on a PC with Windows 11 Ryzen 9 5900X, 64GB, RTX 4080s machine and a MacBook Pro i9 32GB Late 2018
8. Tried different Node versions, no difference
Development 60–120 s or longer for every page load. Production remains fast.
It’s not just the page loads, every interaction, every hover, every click, every scroll can take up to seconds. Our Playwright test (locally) consistently fail because a 1 minute timeout limit still wasn’t enough.
This is the website: https://www.emuready.com/
This is the public repo: https://github.com/Producdevity/EmuReady
⸻
Any suggestions on how to further diagnose or resolve these long compile/rebuild times would be greatly appreciated.
Current setup
• next dev --turbopack with experimental options like optimizePackageImports and custom Turbopack rules.
• Prisma connects to a PostgreSQL database (tried both a remote Supabase instance and a local DB in Docker).
• The (docker) dev container runs prisma migrate deploy and seeds the DB on first run.
• Tailwind removed for testing; pages with and without images show the same slowness.
What we tried
1. Running the app outside Docker and inside Docker—no noticeable difference.
2. Disabling Turbopack
3. Try experimental flags like
optimizeCss
and optimizePackageImports4. Using local vs. remote PostgreSQL and toggling Prisma debug logs. The same remote db that is snappy in production takes up to 12 seconds for simple queries in development.
5. Removing Tailwind by not importing
globals.css
in the layout.tsx
. No measurable difference. 6. Using a DB with a handful of items instead of hundreds, no difference.
7. Tried running it on a PC with Windows 11 Ryzen 9 5900X, 64GB, RTX 4080s machine and a MacBook Pro i9 32GB Late 2018
8. Tried different Node versions, no difference
Development 60–120 s or longer for every page load. Production remains fast.
It’s not just the page loads, every interaction, every hover, every click, every scroll can take up to seconds. Our Playwright test (locally) consistently fail because a 1 minute timeout limit still wasn’t enough.
This is the website: https://www.emuready.com/
This is the public repo: https://github.com/Producdevity/EmuReady
⸻
Any suggestions on how to further diagnose or resolve these long compile/rebuild times would be greatly appreciated.