How I Cut Deploy Time from 8 Minutes to 90 Seconds
I measured before I fixed
Deploys took 8 minutes. I ran vercel build --debug and saw 3 bottlenecks: cold cache, N+1 queries to Neon, and a 2.1MB bundle. Latency and cost budgets get their own six-stage route once the workload is an agent, and I write that route in AI Agent Development: From Prototype to Production.
What I changed
- I enabled Vercel build cache and pinned Node 22.
- I switched to Neon pooled driver and added statement cache. That same stack later carried shops that pay monthly, and I count the result up in Micro-SaaS for Local Services: From $0 to $3K MRR in 90 Days.
- I split heavy charts with dynamic import and cut bundle to 1.2MB.
Result
Build 90 seconds, LCP 1.1s, p95 query 12ms. The dashboard now shows deploy time per commit. When the number goes up, I know where to look. Measure first, then learn whatever the number points at: I keep that habit and argue for it in Ship Faster Than the Tech Changes.