AA
Abdul Ahad
Projects
Services
Blog
About
Connect
AA
Abdul AhadFull-Stack Engineer

Building digital products that feel as good as they look. Focused on performance, accessibility, and high‑impact visual narratives.

Navigation

PortfolioMy StoryJourneyStackContact

Core Stack

TypeScript
Next.js 16
Node.js
PostgreSQL
Tailwind CSS

Status

Available

Accepting 2 new projects this quarter. Fast booking recommended.

Get in touch →
© 2026 Abdul Ahad•Handcrafted with Passion
OSS
Blog•DevOps

Performance Auditing: Using Lighthouse and Vercel Speed Insights

Abdul Ahad
Abdul AhadFull Stack Engineer
PublishedJanuary 10, 2026
Expertise5+ Years Experience
VerificationFact-Checked
Performance Auditing: Using Lighthouse and Vercel Speed Insights

Abdul Ahad | Senior Full-Stack Engineer | Last Updated: March 2026

Performance is no longer a tertiary "nice-to-have" engineering metric; it is the absolute foundation of your acquisition funnel. According to recent search algorithm disclosures, Google uses Core Web Vitals (CWV) as a direct ranking factor for both mobile and desktop. A poor LCP score will unequivocally throttle your organic reach.

Two months ago, a heavy Next.js client portal we audited had an LCP of 4.2s (putting it deep into the "Poor" category). Here is exactly how we used Chrome Lighthouse for synthetic baselining, and Vercel Speed Insights for Real-User Monitoring (RUM), to drive that LCP down to a steady 1.4s.

The Synthetic Baseline: Lighthouse CLI

Running a Lighthouse test via Chrome DevTools is fine for quick spot checks, but for rigorous engineering, we utilize the Lighthouse CI/CLI to establish a strict synthetic baseline free of browser-extension noise.

# Install Lighthouse globally
npm install -g lighthouse

# Run against an edge-deployed preview URL in headless mode
lighthouse https://my-portfolio.com --view --only-categories=performance --chrome-flags="--headless"

Our initial CLI baseline highlighted three fatal errors:

  1. Render-Blocking JavaScript: The main thread was paralyzed for over 900ms parsing a massive 1.2MB React bundle.
  2. Unoptimized Hero Images: A 3MB .png hero graphic was taking 2.5s to cross the wire on simulated 4G networks.
  3. Severe Cumulative Layout Shift (CLS): System fonts mapping to custom web fonts caused paragraphs to physically shift 40px down during hydration.

The Fix: Engineering for the Vitals

  1. The Bundle Bloat: We attacked the JS payload by implementing rigorous dynamic imports in Next.js. Any chart mapping libraries (like recharts) were shifted to next/dynamic so they only loaded when scrolled into view.
  2. The Image Trap: We converted all static assets to WebP and AVIF formats, and utilized the next/image component to automatically enforce strict width/height attributes, coupled with priority=true for the LCP hero element.
  3. The CLS Issue: We adopted next/font to seamlessly leverage zero-layout-shift web fonts by injecting fallback size-adjusting CSS at compile time.

Moving to Production: Vercel Speed Insights (RUM)

Lighthouse provides a sterile, synthetic snapshot. It does not tell you how a user sitting in a cafe in Karachi on a 3G network experiences your application. That is where Real-User Monitoring (RUM) is mandatory.

We integrated Vercel Speed Insights directly into the Next.js app/layout.tsx.

import { SpeedInsights } from "@vercel/speed-insights/next"

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        {children}
        {/* Captures actual field data silently in the background */}
        <SpeedInsights />
      </body>
    </html>
  )
}

The data was illuminating. While Lighthouse gave us a score of 95/100, the RUM data showed our 75th percentile LCP was actually 2.8s. The culprit? Our global CDN configuration was caching HTML effectively in North America, but experiencing continuous cache-misses in the Middle East and South Asia regions.

By analyzing the geospatial Speed Insights data, we adjusted our Edge caching headers and pushed our core static assets closer to our active user base, perfectly aligning the RUM data with our synthetic Lighthouse targets.

Frequently Asked Questions

What are the Core Web Vitals (CWV)?

Core Web Vitals are a set of specific metrics used by Google to measure website user experience and SEO ranking validity. The three most critical metrics are Largest Contentful Paint (LCP for loading performance), Interaction to Next Paint (INP for interactivity/responsiveness), and Cumulative Layout Shift (CLS for visual stability).

What is the difference between Lighthouse and Speed Insights?

Google Lighthouse is a synthetic testing tool that simulates a page load on specific throttled hardware to provide optimization suggestions. Vercel Speed Insights is a Real-User Monitoring (RUM) tool that tracks how actual human users across the globe experience your application's loading and interaction speeds.

How do you fix a high Cumulative Layout Shift (CLS)?

CLS is typically caused by images loading without predefined width and height attributes, causing surrounding text to abruptly shift downward. It is also caused by custom web fonts swapping in after default fonts have rendered. Using HTML explicitly declaring dimensions, or frameworks like Next.js next/image and next/font, prevents these shifts automatically.


Further Reading

  • Web Vitals Guide by Google
  • Vercel Speed Insights Documentation
  • Next.js Image Optimization

Knowledge Check

Ready to test what you've learned? Start our quick3 question quiz based on this article.

Share this article

About the Author

Abdul Ahad is a Senior Full-Stack Engineer and Tech Architect with 5+ years of experience building scalable enterprise SaaS and high-performance web systems. Specializing in Next.js 15, React 19, and Node.js.

More about me →