Frontend School
DashboardProblemsLearnPracticeMock InterviewReportsStatsBuy Credits
DashboardProblemsLearnPracticeMock Interview
Frontend System Design Roadmap
  1. 1.HTTP/1.1 vs HTTP/2 vs HTTP/3 (QUIC)
  2. 2.TCP and TLS Handshakes: Connection Setup Costs
  3. 3.Browser Network Stack and Connection Pooling
  4. 4.GET vs POST and Idempotency in HTTP
  5. 5.The Critical Rendering Path (CRP)
  6. 6.DOM, CSSOM and the Render Tree
  7. 7.Layout, Paint and Compositing
  8. 8.Reflows and Repaints Explained
  9. 9.Event Loop: Call Stack, Task and Microtask Queues
  10. 10.Async JavaScript: Promises and async/await
  11. 11.Web Workers: Multi-threading in the Browser
  12. 12.Browser Storage: Cookies, Web Storage, IndexedDB
  13. 13.Client-Side Storage: Limits and Security Risks
  14. 14.Choosing the Right Client-Side Storage
  15. 15.HTTP Caching: Cache-Control, ETag, Last-Modified
  16. 16.Browser-Level Caching Mechanisms
  17. 17.Cache Invalidation for Frontend Apps
  18. 18.Structuring a Large Single-Page App
  19. 19.Component-Based Architecture Principles
  20. 20.Props, State and Component Lifecycle
  21. 21.Module Bundling Basics
  22. 22.Core Web Vitals: LCP, INP and CLS
  23. 23.FCP and Time to Interactive (TTI) Explained
  24. 24.Measuring Performance: Lighthouse and WebPageTest
  25. 25.Asset Compression and Minification Basics
  26. 26.What Is a CDN and How Does It Work?
  27. 27.CDN Benefits: Latency, Availability, Offload
  28. 28.CDN Cache Behavior and Invalidation
  29. 29.Global State vs Local Component State
  30. 30.State Patterns: Redux, Zustand and Context
  31. 31.Data Fetching: React Query and SWR
  32. 32.Immutable Data in Frontend State
  33. 33.SSR vs CSR: Rendering Trade-offs
  34. 34.Hydration and Time to First Byte (TTFB)
  35. 35.Static Site Generation (SSG) for Speed and SEO
  36. 36.Incremental Static Regeneration (ISR)
  37. 37.Micro-Frontends: Core Principles
  38. 38.Micro-Frontend Integration Strategies
  39. 39.Communication Between Micro-Frontends
  40. 40.Micro-Frontends: Pros and Cons for Large Teams
  41. 41.Real-Time: Polling, SSE and WebSockets
  42. 42.Real-Time Use Cases: Chat, Alerts, Live Data
  43. 43.Designing a Real-Time Data Flow
  44. 44.Scaling WebSocket Connections
  45. 45.Responsive Images: srcset, sizes and picture
  46. 46.Modern Image Formats: WebP, AVIF, JPEG XL
  47. 47.Lazy Loading Images and Videos
  48. 48.Video Streaming: HLS, DASH, Adaptive Bitrate
  49. 49.REST and GraphQL for Frontend Engineers
  50. 50.Batching, Throttling and Debouncing API Calls
  51. 51.Handling API Errors in the Frontend
  52. 52.Authentication Flows: OAuth and JWT
  53. 53.Global Error Boundaries in React
  54. 54.Error Reporting: Sentry and LogRocket
  55. 55.Graceful Degradation and Fallback UIs
  56. 56.Real User Monitoring (RUM)
  57. 57.CORS: Cross-Origin Resource Sharing
  58. 58.Preventing XSS (Cross-Site Scripting)
  59. 59.CSRF Protection for Frontend Apps
  60. 60.Content Security Policy (CSP)
  61. 61.Storing Auth Tokens: Cookies vs localStorage
  62. 62.PWA Manifest and Installability
  63. 63.Service Workers: Lifecycle and Caching Strategies
  64. 64.Offline Support and Background Sync
  65. 65.Push Notifications for Web Apps
  66. 66.Webpack vs Vite vs Parcel
  67. 67.Code Splitting, Tree Shaking, Asset Optimization
  68. 68.Module Resolution and Hot Module Replacement
  69. 69.Monorepo Tooling: Nx and Lerna
  70. 70.Atomic Design for Component Libraries
  71. 71.Theming and Customization in Design Systems
  72. 72.Accessibility in Component Libraries
  73. 73.Component Library Docs, Testing and Versioning
  74. 74.Publishing and Consuming a Component Library
  75. 75.Full-Text Search: Levenshtein and Fuzzy Matching
  76. 76.Indexing Large Datasets in the Browser
  77. 77.Search Performance: Debouncing and Web Workers
  78. 78.Integrating Backend Search Services
  79. 79.Choosing a Chart Library: D3, Chart.js, Recharts
  80. 80.Rendering Large Datasets: Canvas vs SVG
  81. 81.Interactive, Responsive Data Visualizations
  82. 82.Data Fetching and Aggregation for Dashboards
  83. 83.A/B Test Design and Rollout Strategies
  84. 84.Client-Side vs Server-Side A/B Testing
  85. 85.Feature Flags and Remote Configuration
  86. 86.Experiment Data Collection and Analytics
Frontend System Design Roadmap
24

Frontend System Design · Lesson 24 of 86 · 4 min

Measuring Performance: Lighthouse and WebPageTest

In an interview, you need to justify performance work with data. This is how you get that data.

You can't fix what you can't measure. Lighthouse and WebPageTest are the two standard tools for gathering performance data. They answer different questions, and knowing which one to use for a given problem is a core engineering skill.

Lighthouse gives you a broad, automated audit. WebPageTest gives you a deep, granular diagnostic. You need both.

Use Lighthouse for quick, repeatable checks

Lighthouse is your first stop. It runs a series of audits against a URL in a simulated environment—typically a throttled CPU and network on a mobile device profile. The output is a report with scores from 0-100 for Performance, Accessibility, Best Practices, and SEO.

Its main purpose is to give you a consistent, repeatable baseline. Use it during local development to see the impact of your changes. More importantly, run it in your CI/CD pipeline to automatically catch performance regressions before they hit production.

The trap: Don't obsess over getting a perfect score of 100. The score is a guide. The real value is in the "Opportunities" and "Diagnostics" sections, which give you a prioritized list of what to fix, like "Eliminate render-blocking resources" or "Reduce initial server response time."

You can run Lighthouse directly from Chrome DevTools, but the command-line interface (CLI) is better for automation.

# Install it once globally
npm install -g lighthouse

# Run an audit on a URL, save it as an HTML file,
# and automatically open the report in your browser.
lighthouse https://www.example.com --output html --output-path ./report.html --view

Use WebPageTest for deep-dive diagnostics

When Lighthouse tells you what is slow, WebPageTest helps you find out why.

WebPageTest runs tests from multiple locations around the world using real browsers on real devices with various network conditions. It doesn't give you a simple score. Instead, it provides incredibly detailed reports, with its most valuable feature being the network waterfall chart.

The waterfall chart visualizes every single request the browser makes to render your page. It shows you what's blocking the critical rendering path, which assets are taking too long to download, and where network latency is hurting you.

Use WebPageTest when you need to:

  • Diagnose a complex performance issue that isn't obvious from a Lighthouse report.
  • Understand why real users in a specific geographic region are having a slow experience.
  • Benchmark your site against a competitor in fine detail.
  • Analyze the impact of third-party scripts.

In an interview, the waterfall chart is your evidence. Instead of saying "I would reduce the number of scripts," say "I would look at the WebPageTest waterfall to identify long-running scripts or chains of dependent requests that might be blocking the main thread, and then investigate deferring or inlining them."

How to choose the right tool

The tools are complementary. Your workflow determines which one you reach for. Lighthouse is for routine check-ups; WebPageTest is for specialist consultations.

A common workflow is to use Lighthouse to identify a problem (e.g., "Largest Contentful Paint is 5.2s") and then use WebPageTest to diagnose the root cause (e.g., "The LCP image is blocked from downloading for 3s by a render-blocking CSS file").

How to talk about performance tools

When asked how you'd improve a slow website, frame your answer around a measurement-driven process.

Start by stating the difference: "First, I'd need to understand the problem with data. I'd use Lighthouse for a quick, automated audit to identify the low-hanging fruit. It gives us repeatable lab data. For deeper, real-world issues, especially network-related ones, I'd use WebPageTest to get a detailed waterfall chart from a relevant location."

Then, describe a hypothetical workflow. "For example, if Lighthouse flags 'Eliminate render-blocking resources,' I'd use WebPageTest to see exactly which CSS or JS files are blocking the start render time. The waterfall chart would show me the request chain, and I could then decide whether to inline critical CSS, or add async or defer attributes to the scripts."

This shows you don't just guess. You diagnose problems systematically.

Try it

Pick a news website or a complex e-commerce site. Run a Lighthouse audit on it from Chrome DevTools with the "Mobile" device setting. Note the top performance "Opportunity." Now, run the same URL through webpagetest.org using a "Mobile - 4G" connection. Find the corresponding issue in the waterfall chart. For example, if Lighthouse suggests "Reduce unused JavaScript," find that large JS bundle in the waterfall and see what other requests it might be blocking.

Next: Now that you can find performance bottlenecks, we'll cover the most common fix in Asset Compression and Minification Basics.

Lock it in — apply this lesson under interview conditions.

Try a free mock interviewPractice system design problems
Previous

FCP and Time to Interactive (TTI) Explained

Next

Asset Compression and Minification Basics