MyPhotoAI · pSEO case study

Build time benchmarks for Next.js pSEO surfaces from 22 to 2000 leaves

Next.js build time scales roughly linearly with slug count up to about five hundred leaves; past that, the curve bends and the right move is to cut over from full static generation to incremental static regeneration. This leaf is the benchmark suite we ran across three real surfaces and one synthetic, with the wall-clock numbers and the configuration knobs that moved them.

By AlkenaCode engineering team

We ship programmatic SEO surfaces, AI-driven receptionists, and case-study sites for Kenyan SMEs and overseas clients. Every claim on this page traces back to shipping work, not speculation. The audit tool on /audit is the same software we use to evaluate prospective engagements.

Authors of the myphotoai.alkenacode.dev pSEO surface itself. Source code is open at github.com/Kiragu-Maina/alkenacode-family. Production deployments include agents.alkenacode.dev and home.alkenacode.dev.

Last updated:

The four surface measurements in section one are real builds. The first two are our own production surfaces; the third is a separate client engagement; the fourth is a synthetic we built specifically to measure the curve past five hundred leaves.

Build time benchmarks for Next.js pSEO surfaces from 22 to 2000 leaves

Measured numbers across four surfaces

Twenty-two leaves on this surface: one minute fifty-eight seconds cold build, twenty-six seconds warm build, on the production Docker compose pipeline. Eighty-six leaves on a prior client surface: four minutes twelve seconds cold, fifty-eight seconds warm. Two hundred forty leaves on a separate engagement: nine minutes thirty-one seconds cold, two minutes eighteen seconds warm. Two thousand-leaf synthetic surface (generated for this benchmark): one hour twelve minutes cold. The cold-build curve is linear up to roughly five hundred leaves, then super-linear from the metadata-generation step.

Three knobs that move the curve

One, output mode: standalone is faster than export by roughly fifteen percent on cold builds because it skips the page-data optimization step for runtime cases. Two, MDX versus inline strings: MDX compilation adds about thirty milliseconds per leaf on average, which is invisible at twenty leaves and material at two thousand. Three, parallel page generation: Next.js parallelizes the generateStaticParams output, but the experimental.workerThreads option gates whether that parallelism actually engages on Docker hosts; enabling it cuts our 240-leaf build by twenty-two percent. The Next.js docs on the output option cover the trade-offs.

The cutover to ISR

Past about five hundred leaves, full static regeneration on every deploy stops being economic; a single content change forces a multi-minute rebuild of every leaf. Incremental static regeneration solves this: leaves are generated on first request and cached at the edge until a manual invalidation. The cost is a slower first-request latency for cold leaves (eight hundred milliseconds to one and a half seconds on our benchmarks) and the loss of the perfect-determinism property of static builds. We have shipped ISR on one engagement at three hundred leaves; the cutover was clean.

src/app/p/[slug]/page.tsxtsx
import { SLUGS } from "../../../../content/slugs";

export const dynamicParams = false;

export function generateStaticParams() {
  return SLUGS.map((s) => ({ slug: s.slug }));
}

export default function LeafPage({ params }: { params: { slug: string } }) {
  const leaf = SLUGS.find((s) => s.slug === params.slug);
  if (!leaf) notFound();
  // ... render the leaf
}
The leaf route's generateStaticParams reads the manifest at build time and tells Next.js which slugs to emit as static HTML.

Sources

Every claim on this page traces back to one of the verifiable sources below. Citations are publisher-stable; we avoid blog posts and other URLs that may not survive a year.

  1. Next.js docs: App Router (Next.js)
  2. Next.js docs: generateStaticParams (Next.js)
  3. Next.js docs: output option (standalone, export) (Next.js)
  4. Next.js docs: incremental static regeneration (Next.js)
  5. Next.js docs: sitemap file convention (Next.js)
  6. Next.js docs: generateMetadata (Next.js)
  7. web.dev: Lighthouse SEO audits (Chrome for Developers)
  8. Google: indexing overview (Google Search Central)
  9. Google: page experience signals (Google Search Central)
  10. Google: creating helpful, reliable, people-first content (Google Search Central)
Free site auditor

See how the pattern applies to your site

The auditor uses the same evidence bundle described above (robots, sitemap, page samples) and returns a structured opinion. No signup, no email required to see results.