Keep Performance on Track with Lighthouse Budgets

Lighthouse now includes built-in support for performance budgets through a feature called LightWallet. The tool, available in the command line version of Lighthouse v5 and later, can provide useful feedback on key performance metrics as well as the overall size and quantity of page resources during your audits.

Setup and Configuration

After installing the latest Lighthouse, the next step is defining expectations in a budget.json file. According to the example given, developers can set limits on JavaScript payloads, page weight, the number of third-party requests, and two core performance metrics. Specifically, the sample file enforces a 3000ms limit for Time to Interactive, a 1000ms limit for First Meaningful Paint, a cap of 125 KB for JavaScript, a maximum of 300 KB for total page size, and a maximum of 10 requests to third-party origins.

Running the Audit

Lighthouse uses a --budget-path flag to locate the budget specification file. Once the configuration is in place and the command is executed, the resulting HTML report includes a dedicated Budgets section within the Performance category. For developers working with the JSON output, the LightWallet findings are available under the performance-budget audit. A complete rundown of supported resource types and metrics is documented in the official Lighthouse performance budgets documentation on GitHub.

The whole setup is designed to take under five minutes, making it an easy way to fold performance guardrails directly into a development workflow.