Skip to main content
AJPR World - Senior Software Engineering & AI Studio

How We Achieved a 100 Mobile Lighthouse Score on Next.js 16 with Turbopack

The exact production blueprint we used to hit 100/100 Mobile Performance, 0ms TBT, and 1.1s LCP on Next.js 16: CSS chunking, zero runtime polyfills, and ISR connection pooling.

Written By
Aman Joshi
Aman JoshiFounder & CEO
Read time: 5 min
Published: November 15, 2026 | Updated: November 15, 2026
SOFTWARE ENGINEERING & ARCHITECTURE
Learn about our Learn about our

Hitting a 100/100 Lighthouse score on a desktop browser with an M3 Max MacBook and fiber internet is easy. Anyone can do it with static HTML.

Hitting a verified 99–100 Mobile Performance score on emulated 4G with CPU throttling on a production Next.js 16 application with dynamic Postgres databases, dual-region currency switching (USD/INR), and real-time interactive widgets is a completely different engineering challenge.

Most modern agency sites score between 40 and 65 on mobile. They blame Next.js, they blame third-party scripts, or they tell clients that "Google's emulated mobile device is unrealistic."

At AJPR World, we refuse excuses. We believe that an engineering studio building high-speed SaaS platforms and AI systems must hold its own production web properties to the absolute highest standard.

Here is the exact production blueprint of how we engineered our platform to achieve a 100 Mobile Lighthouse score, 0ms Total Blocking Time (TBT), and 1.1s Largest Contentful Paint (LCP).


1. The Myth of the "Good Enough" 80 Score

Before getting into code, let us address why this matters commercially:

  1. Google Organic Search Priority: Core Web Vitals (FCP, LCP, INP, CLS) are direct ranking signals in Google's ranking algorithms. Sub-second pages receive preferential mobile crawl budget.
  2. Ad Conversion Rate Multiplier: Studies across Google and Cloudflare consistently prove that every 100ms reduction in load latency increases mobile conversion rates by 8.4%.
  3. Generative Engine Authority: AI answer engines (Perplexity, ChatGPT Search, Claude) favor web assets with high extraction velocity and low DOM complexity.

2. Bottleneck #1: Crushing Total Blocking Time (TBT) to Exactly 0ms

Total Blocking Time measures the total time between First Contentful Paint (FCP) and Time to Interactive (TTI) where the browser's main thread was blocked for more than 50ms by JavaScript execution.

In Next.js App Router, the #1 cause of high TBT is hydration bloat: the client downloading and executing runtime polyfills, heavy icon libraries, and client components for sections that could have been rendered as pure server components.

Our 3-Step Main-Thread Optimization:

A. Stubbing Empty Runtime Polyfills in Webpack & Turbopack

Next.js historically injects polyfills into client bundles even when modern browsers do not need them. In our next.config.js, we stubbed unnecessary runtime polyfills:

turbopack: {
  resolveAlias: {
    '../build/polyfills/polyfill-module': './lib/empty-polyfill.js',
    'next/dist/build/polyfills/polyfill-module': './lib/empty-polyfill.js',
  },
},
webpack: (config, { isServer }) => {
  if (!isServer) {
    config.resolve.alias['next/dist/build/polyfills/polyfill-module'] = path.resolve(__dirname, './lib/empty-polyfill.js');
  }
  return config;
}

B. Tree-Shaking Heavy Icon Packs with optimizePackageImports

Importing icons from libraries like lucide-react or Radix UI can accidentally bundle thousands of unused SVG modules into the client bundle. We configured granular compiler tree-shaking:

experimental: {
  optimizePackageImports: [
    'lucide-react',
    '@radix-ui/react-accordion',
    '@radix-ui/react-dialog',
    '@radix-ui/react-scroll-area',
  ],
}

C. Dynamic Code-Splitting for Below-the-Fold Sections

Only the above-the-fold Hero component is rendered immediately on the client. All secondary sections are dynamically imported with zero main-thread contention:

const CoreValuesSection = dynamic(() => import('@/components/sections/CoreValuesSection'));
const AccountabilityPledgeSection = dynamic(() => import('@/components/sections/AccountabilityPledgeSection'));

The Result: Main-thread execution delay dropped from 480ms to 0 ms.


3. Bottleneck #2: Eliminating Render-Blocking CSS

Lighthouse diagnostics frequently flag: "Render-blocking requests β€” Est savings of 250ms (...chunks/...css)".

Next.js generates a bundled CSS chunk for Tailwind utility classes. If the browser must download 150KB of CSS before drawing a single pixel, your First Contentful Paint (FCP) stalls.

How We Reduced Critical CSS to Under 33 KiB:

  1. Purged Unused CSS Utilities: We eliminated custom CSS classes and replaced them with standard Tailwind 4 atomic tokens, allowing Turbopack to emit an ultra-compact 33.6 KiB gzipped critical stylesheet.
  2. Replaced Heavy Gaussian Blurs with Pure Radial Gradients: Heavy CSS filters like filter: blur(140px) force the mobile GPU to recalculate raster layers on every scroll event. We replaced them with pure mathematical CSS radial gradients:
    /* GPU-Friendly Pure Radial Gradient */
    background: radial-gradient(ellipse at top, rgba(37,99,235,0.14), transparent 70%);
    

4. Bottleneck #3: Sub-Second LCP (Largest Contentful Paint)

Largest Contentful Paint measures when the main hero content becomes visible. On our homepage, the LCP element is our primary headline: "We build custom software, web platforms, and AI systems."

To drive LCP down to 1.1 seconds on emulated mobile 4G:

  1. Removed Client Preload Chains: We eliminated speculative preloads on header logos and secondary assets that were competing for network bandwidth with the critical hero text.
  2. Pure Server Component Text Rendering: The hero text renders instantly from HTML streams without waiting for JavaScript execution.
  3. Next.js Preconnect Hints: We enabled X-DNS-Prefetch-Control: on in HTTP headers to establish instant handshakes with our edge CDN.

5. Bottleneck #4: PostgreSQL Connection Pooling & ISR (Sub-150ms TTFB)

A frontend can be perfectly optimized, but if your server-side database query takes 800ms to respond, your Time to First Byte (TTFB) ruins the user experience.

The Database Architecture:

  1. Global Singleton Connection Pooling: Instead of instantiating new PostgreSQL connections on every serverless invocation, we maintain a persistent connection pool across invocations:
    let cachedPool: Pool | null = null;
    const getPool = () => {
      if (cachedPool) return cachedPool;
      cachedPool = new Pool({
        connectionString: process.env.DATABASE_URL,
        max: 10,
        idleTimeoutMillis: 10000,
      });
      return cachedPool;
    };
    
  2. Incremental Static Regeneration (ISR): Public pages revalidate on background intervals (revalidate: 86400), serving cached HTML directly from Vercel's Edge CDN in under 10ms TTFB.

6. Summary Scorecard

MetricTarget StandardBefore OptimizationAJPR World Production
Mobile Performance Score90+6299 – 100
Total Blocking Time (TBT)< 200 ms480 ms0 ms
Largest Contentful Paint (LCP)< 2.5 s3.8 s1.1 s
Cumulative Layout Shift (CLS)< 0.10.040.000
Desktop Performance Score90+88100 / 100

Want Us to Audit Your Application's Architecture?

If your Next.js application, SaaS product, or mobile web platform is suffering from slow load times, high bounce rates, or failed Core Web Vitals audits:

Share This Strategy:
Aman Joshi

Aman Joshi

Founder & Systems Architect

Aman leads strategy and engineering at AJPR World, helping US startups, B2B enterprises, and high-growth brands scale organic pipeline through radical transparency, Generative Engine Optimization, and full-stack software architecture.

No Lock-in Traps. Radical Transparency.

Ready to Hire an Agile Marketing & Tech Partner?

We eliminate junior middleman bloat. Partner directly with senior growth practitioners on month-to-month retainers.

Schedule Strategy Review

Continue Reading

Explore more actionable data studies and growth blueprints.

Topical Authority Hub

Explore Engineering Blueprints, Pricing & Alternatives

Browse All Capabilities β†’