InterviewStack.io LogoInterviewStack.io

Frontend Performance Optimization Questions

Comprehensive techniques and trade offs for improving client side performance in web applications and single page applications. Candidates should understand the browser rendering pipeline and critical rendering path including parsing, style calculation, layout, paint, and compositing, and how layout and paint costs produce reflow and repaint. They should know how component design and code patterns affect rendering and how to avoid layout thrashing and unnecessary re rendering. Candidates must be able to diagnose and mitigate JavaScript execution bottlenecks and long tasks that block the main thread using browser developer tools and performance application programming interfaces. Key topics include bundling and module strategies such as code splitting, lazy loading, tree shaking, and bundle size reduction; image optimization and responsive image techniques; network optimization including resource prioritization, compression, and caching strategies; service workers for offline capabilities and advanced caching patterns; and use of web workers to offload computation. Advanced considerations include virtual scrolling for large lists, progressive enhancement, server side rendering and client side rendering trade offs and hydration cost for universal applications, browser memory management and garbage collection implications, and how frontend decisions interact with backend constraints and overall system architecture. Candidates should also be familiar with measuring user experience using Core Web Vitals such as Largest Contentful Paint, First Input Delay, and Cumulative Layout Shift, with real user monitoring and synthetic testing, and with establishing performance budgets and continuous performance monitoring.

EasyTechnical
61 practiced
Walk me through using Chrome DevTools to measure a slow single-page app's load and runtime performance. List the DevTools panels and recordings you would use (e.g., Performance, Coverage, Network) and the steps to collect data for diagnosing long main-thread tasks and large bundle impact.
MediumSystem Design
83 practiced
Design a virtual scrolling (windowing) solution for rendering a list of 100k items in a SPA. Address dynamic item heights, keyboard accessibility, focus management, and how you'd test correctness and performance. Mention libraries you might use and why.
HardTechnical
82 practiced
Create a realistic performance budget for a medium-sized SPA (home page LCP target 2.5s). Include numeric budgets for: total JS bundle size, initial server payload (HTML), number of critical requests, time-to-first-byte, LCP, CLS, and max long task duration. Explain how you'd enforce this budget in CI and handle false positives.
MediumTechnical
78 practiced
Design a font-loading strategy to avoid FOIT (flash of invisible text) but also avoid large layout shifts. Explain how to use <link rel="preload">, font-display: swap, font subsets, and variable fonts. Include trade-offs for using system fonts vs web fonts.
MediumTechnical
75 practiced
A popular content page has a high CLS score due to images and ads that load and shift content. Describe a step-by-step plan to reduce CLS including HTML/CSS changes, image attributes, ad sizing, and any runtime techniques. What metrics or tests would you run to validate the fix?

Unlock Full Question Bank

Get access to hundreds of Frontend Performance Optimization interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.