liveBook · Manning

Compressed length

As explained in Fast by Default

Compressed size is the amount of storage occupied by data after applying a compression algorithm.

Compressed length is the amount of data sent after compression, making it the relevant measure for network transfer and initial-load budgets. It differs from uncompressed size, which affects browser parsing and execution after delivery. section 6.2.2

Bundle transfer versus processing

A JavaScript bundle compressed to 200KB may expand to 700KB in the browser. The compressed value determines download time; the expanded value contributes to parsing and execution cost. section 6.2.2

Apply compressed length as a performance budget by:

  • Measuring the gzip- or Brotli-compressed JavaScript sent to browsers. section 6.2.2
  • Setting stricter limits when JavaScript dominates the critical path, especially for mobile users and JavaScript-heavy applications. section 6.2.2
Table 6.1 Russell’s performance budget baselines
Page type
Example
JavaScript share
Total budget (3s load)
JavaScript-heavy
SPAs, client-rendered apps
50%
1.2MB
JavaScript-light
Server-rendered sites
15%
2.0MB

Compare total budgets for JavaScript-heavy and JavaScript-light pages, including their JavaScript shares and three-second-load baselines. section 6.2.2

How Fast by Default covers it

How deep it goes
Defines transfer measurement and contrasts parsing costs, but stops short of compression-algorithm internals.
Examples
Uses a 200KB compressed and 700KB expanded bundle plus budgets for JavaScript-heavy and JavaScript-light pages.
What it assumes
Assumes browser-delivered code and explains from zero why compressed and uncompressed sizes represent different costs.
What you can do after
Evaluate browser-load impact by measuring compressed bundle size separately from parsing and execution costs.
How it connects
Connects JavaScript bundle size with gzip, Brotli, network transfer, parsing, execution, and WebAssembly modules.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fast by Default. The section links point to the parts of the book it draws on.