---
title: "First-load JavaScript exceeds the budget (perf/js-budget)"
description: "perf/js-budget: JavaScript is the most expensive byte: it must be downloaded, parsed, compiled and executed on the main thread."
canonical: https://void-design.vercel.app/rules/perf/js-budget
lastModified: 2026-09-16
---

# First-load JavaScript exceeds the budget

`perf/js-budget` · severity **warn** · category Performance · detected by `void perf` and `void audit`

## Why it matters

JavaScript is the most expensive byte: it must be downloaded, parsed, compiled and executed on the main thread. Marketing pages over ~170 KB compressed are slow on mid-range phones.

## How to fix it

Render static UI on the server, lazy-load below-the-fold widgets, replace heavy libraries (moment, lodash, chart libs) and load third-party scripts on interaction or idle.

## References

- https://infrequently.org/2025/11/performance-inequality-gap-2026/

## More performance rules

`void perf` reports 25 rules in this category. Core Web Vitals and bytes: LCP, CLS, TBT, TTFB, JavaScript, CSS, fonts, images, caching and compression, measured as the median of several runs on a throttled mobile and a desktop profile.

- `cls-high` Cumulative Layout Shift is high — [perf/cls-high](https://void-design.vercel.app/rules/perf/cls-high)
- `ttfb-slow` Server response (TTFB) is slow — [perf/ttfb-slow](https://void-design.vercel.app/rules/perf/ttfb-slow)
- `fcp-slow` First Contentful Paint is slow — [perf/fcp-slow](https://void-design.vercel.app/rules/perf/fcp-slow)
- `tbt-high` Main thread is blocked by long tasks during load — [perf/tbt-high](https://void-design.vercel.app/rules/perf/tbt-high)
- `css-budget` CSS transfer exceeds the budget — [perf/css-budget](https://void-design.vercel.app/rules/perf/css-budget)
- `font-budget` Web font transfer exceeds the budget — [perf/font-budget](https://void-design.vercel.app/rules/perf/font-budget)
- `too-many-fonts` Too many font files are downloaded — [perf/too-many-fonts](https://void-design.vercel.app/rules/perf/too-many-fonts)
- `image-budget` Image transfer exceeds the budget — [perf/image-budget](https://void-design.vercel.app/rules/perf/image-budget)

Detected by `void perf` and `void audit`. Explain it in a terminal: `void rules perf/js-budget`
