Profiling in the Browser
Learn about how to find and analyze key metrics in the browser tools.
Profiling Web Applications in the Browser
In Optimization Recommendations and Requirements, we stressed the importance of profiling web applications before beginning any optimization. Here, we give an overview of how browser developer tools can be used to profile application metrics
In this section, we use screenshots from Chrome, as it is has the largest user base. However, developer tooling functions similarly across browsers. For instance, Edge and Chrome use the exact same developer tools, with some minor UI differences. Safari has a slightly different collection of tools, but it can be used to achieve similar results. In the next section, we provide platform-specific resources for profiling web applications.
🧰 Accessing Developer Tools

Most profiling utilities are accessible in the "Developer Tools" menu (Web Inspector in Safari). This menu is accessed in a different way on each browser:
Chrome
Ctrl-Shift-J (Windows) Command-Option-K (Mac)
Edge
F12
Safari
Command-Option-C
Firefox
Ctrl-Shift-K. (Windows) Command-Option-K (Mac)
⏱️ Profiling Application Metrics
The Developer Tools browser menu can be used to access profilers for the core application metrics described in Optimization Recommendations and Requirements. Here, we give an overview of generating profiles with these tools and interpreting the results.
Overview
We recommend enabling the built-in FPS overlay on desktop devices while developing an application. This allows developers to quickly detect if a change has impacted performance, even when not they are not doing optimization work. This helps prevent performance regressions from accidentally getting out to users.
Guide: Enabling the FPS Overlay
Focus the Developer Tools Menu and enter ctrl/cmd + shift + P
. This opens a search menu:

Type "show FPS" into the search menu and hit Enter

Observe the FPS counter in the top left corner of the application.

Interpreting Results
Average FPS is displayed at the top of the overlay (69.6 FPS in the picture above)
Variance in FPS can be determined from the colored bar below the average FPS. Yellow segments represent samples above 60 fps, while red segments represent samples below 60 fps. In the image above, FPS is hovering around 60 fps, so short red segments are interspersed with short yellow segments.
In a well-optimized application, all segments will be yellow:
In a poorly-optimized application, many segments will be red:
GPU memory usage is displayed at the bottom of the overlay. GPU performance typically scales with memory usage. In the image above, there is very little GPU overhead.
📱 Profiling Mobile Devices
There are two main ways to capture mobile performance metrics:
directly profiling a connected mobile device
emulating a mobile device in the browser
These techniques should be used in combination. Profiling mobile hardware gives more representative data, while emulation can be used to provide a wider range of data points. Crucially, GPU performance does not scale in browser emulators, so frame rate may be higher in the emulator. Emulators should primarily be used to approximate CPU performance across a range of devices and to validate image quality across a range of resolutions.
Prerequisites
Access to an Android Device
Install Android Debug Bridge (ADB) to connect to the android device.
Install Chrome or Edge on your desktop/laptop computer. In Edge, replace
chrome://
withedge://
for the following steps.
Connecting to an Android Device via USB
Connect an android device via USB
In a terminal, run
adb devices
to start the debugging serverNavigate to chrome://inspect/devices and click "inspect" the connected device
This brings up the Developer Tools menu for the connected device. From here, profiling is the same as on a desktop
Generating Native Performance Profiles
In chrome://inspect/devices, select the "trace" option.
If debugging an Android XR device, select
Edit categories
> checkxr.debug
Click record to begin generating a native trace.
Profiling Resources for Web Browsers and Devices
Beyond the overview we have provided, each browser provides detailed guides for debugging and profiling applications. Here we provide lists of resources for each major browser, as well as resources for connecting to mobile devices from Chrome and Safari.
Platform Support
🖥️ Desktop & 📱 Mobile
Core Developer Tools
Additional Tooling
Tracing Tool: Provides more introspection into the native side of chrome, showing JavaScript engine traces and GPU tracing.
Lighthouse: Tools for optimizing app start time and file size.
Immersive Web Emulator Plugin: emulate XR devices in Chrome Developer Tools
Display frame rate
Mobile Tooling
Last updated
Was this helpful?