DevTools: Performance
Build an accurate mental model of what the browser does, from navigation and HTTP through parsing, rendering, storage, workers, security, and DevTools, so you can predict behavior and debug real pages.
What you will be able to do
#- Record and read a performance trace.
- Find long tasks and hot functions.
- Connect interactions to their rendering work.
Overview
#The Performance panel records what the browser did over time.
Recording
Click record, interact, then stop. The trace shows frames per second, the main thread flame chart, network, and timings.
Reading the flame chart
Wide blocks are slow. Look for long tasks over 50 ms, which block input. Expand a task to see functions, style recalculation, layout, and paint. The Summary view shows total time in scripting, rendering, painting, and idle.
Bottom up and call tree
Bottom up aggregates self time by function, which quickly finds the hot function. Call tree shows the call hierarchy.
Interactions and INP
The Interactions track links user input to the work it triggered. Interaction to Next Paint (INP) measures the latency of input handling; long tasks and heavy rendering are the usual causes.
Questions to carry forward
- What counts as a long task?
- How does Bottom up differ from Call tree?
- Which rendering work most often causes bad INP?
Exercises
#Reference answers and expected output are authored, not executed in this browser. Nothing you type is run, and there is no Run or Pass control on this page.
Exercise 1Predict
A trace shows a 180 ms task on the main thread during a click. What metric suffers most?
Exercise 2Explain
Explain how to find the single hottest function in a trace.
Reveal the reference answer
reference.textOpen the Bottom up view, which aggregates self time by function. The function with the largest self time is the hottest. Confirm by expanding it in the call tree to see its callers.Authored expected output: An answer naming Bottom up self time.
Self time excludes time spent in callees, so the largest self-time entry is the function doing the work itself.
Common misconceptions
#- A task under 50 ms is always fine.
- The Summary view shows per-function cost.
- INP measures only the event handler duration.
Follow-up practice
#- browser-internals-memory-leaks
- browser-internals-core-web-vitals
Your progress
#Answers, drafts and completion marks are stored only in this browser. Nothing is sent to a server and no account is used.
Verification: authored. Answers and outputs on this page are authored reference material, not executed results.