Embed weight

How much does it weigh?

We publish this because a performance claim nobody can check is marketing, not engineering.

18.4 KB

gzipped ยท 57.4 KB raw

18.4 KB used 11.6 KB left of a 30 KB budget

The 30 KB budget is self-imposed. If a release crosses it, the release does not ship until something comes out.

What is in it

In the bundle

Preact
Shadow DOM isolation
The runtime

Not in the bundle

No validator
No React
No globals

Voice loads separately and only when used, so it never appears in this number.

Against other products

We have not measured anybody else. Rather than leave those cells out, we leave them in and mark them, so you can see exactly how much of this table is evidence and how much is not.

MeasureLeadgibleCompetitor ACompetitor BCompetitor C
Runtime size, gzipped 18.4 KB Not yet measuredNot yet measuredNot yet measured
Requests on first paint Not yet measured Not yet measuredNot yet measuredNot yet measured
Core Web Vitals impact Not yet measured Not yet measuredNot yet measuredNot yet measured
Not yet measured We name the competitors only once we have run the same measurement on them, and we mark our own cells the same way when we have not. 11 of the 12 cells here are empty, and they stay empty until they are not.

Scroll the table sideways to see every column.

Methodology

What is measured
The built runtime, gzipped at level 9 - the same compression the release gate uses. Not the source, and not the uncompressed file on disk.
What is not counted
Anything on your page. The figure is the bundle alone, and the voice runtime is a separate lazy-loaded chunk that never appears in it.
By what
scripts/check-embed-size.mjs, which runs on every build and fails it if the number crosses the budget. The figure on this page is read from the same artefact by the same method, so the two cannot disagree.
What a browser actually downloads
Less than this. Our host negotiates brotli when the browser accepts it, which is smaller again - we publish the gzip figure because it is the one the budget is written in and the one you can check.

Reproduce it yourself

Clone the repository and run the gate. It prints the same figure this page does, because it is the same code reading the same artefact.

pnpm --filter @leadgible/embed build
node scripts/check-embed-size.mjs

Or measure what our host sends, without cloning anything:

curl -s -H "Accept-Encoding: gzip" -o /dev/null \
  -w "%{size_download}\n" https://leadgible-staging-app.yhengdesigns.workers.dev/v1/embed.js

That will not print exactly 18.4 KB, and the difference is the point of saying so: a CDN compresses with its own settings, so it lands within a rounding step either side. If yours differs by more than that, tell us and we will publish the correction rather than the average.

Read the embedding docs