From e5f59f106ef00434e09ac2d86fa645492318c64b Mon Sep 17 00:00:00 2001 From: Samuel Letellier-Duchesne Date: Mon, 19 Oct 2026 15:10:01 -0400 Subject: [PATCH] Restate the schema bundle figures for 18 versions The explanation page said 18 versions beside figures from an older 17-version bundle. The figures are re-measured from the committed bundle in idfkit-js (df211d6) and the raw schemas in idfkit main. --- docs/explanation/content-addressed-schemas.md | 18 +++++++++++------- docs/how-to/parse-in-the-browser.md | 2 +- docs/reference/slim-schema-format.md | 2 +- docs/reference/typescript/schemas.md | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/explanation/content-addressed-schemas.md b/docs/explanation/content-addressed-schemas.md index a40d3325..2d0dab64 100644 --- a/docs/explanation/content-addressed-schemas.md +++ b/docs/explanation/content-addressed-schemas.md @@ -4,8 +4,8 @@ the network. Python installs the same schemas from a wheel, one gzipped file per version, where their size is nobody's problem.* -The raw epJSON schemas are about 10 MB each and there are 17 of them, roughly -11.9 MB gzipped for the set. On a page load that number decides your +The raw epJSON schemas are about 10 MB each and there are 18 of them, roughly +12.3 MB gzipped for the set. On a page load that number decides your architecture, so the browser bundle stores the same information differently. {{ parity("schema-access") }} @@ -13,8 +13,8 @@ architecture, so the browser bundle stores the same information differently. ## Most of a schema is the previous schema Object-type definitions barely change between EnergyPlus releases. `Zone` has -not changed since 8.9. Across the 18 versions the bundle indexes 14,092 -type entries and finds only 2,568 distinct definitions behind them: 82% of what +not changed since 8.9. Across the 18 versions the bundle indexes 14,972 +type entries and finds only 2,788 distinct definitions behind them: 81% of what 18 separate schemas would carry is a repeat of something already shipped. So the bundle stores each unique definition once, keyed by a hash of its @@ -22,9 +22,13 @@ content, and gives every version a manifest mapping type name to hash. | | All 18 versions, gzipped | | ---------------------------------------- | ------------------------ | -| Raw epJSON schemas, as Python ships them | 11,915 KB | -| Slimmed (documentation metadata dropped) | 2,922 KB | -| Content-addressed | about 1,000 KB | +| Raw epJSON schemas, as Python ships them | 12,277 KB | +| Slimmed (documentation metadata dropped) | 3,028 KB | +| Content-addressed | 1,189 KB | + +The content-addressed figure is what a parse loads: the index, the 18 manifests +and the definitions. The prose pool, which only describing a type needs, adds +173 KB. The two reductions are independent. Slimming keeps only what a parse needs and discards the documentation weight, which otherwise sits on the critical path of diff --git a/docs/how-to/parse-in-the-browser.md b/docs/how-to/parse-in-the-browser.md index 1aeb506b..5d99ca2c 100644 --- a/docs/how-to/parse-in-the-browser.md +++ b/docs/how-to/parse-in-the-browser.md @@ -24,7 +24,7 @@ Then point `httpSource` at it: ``` `httpSource` fetches the gzipped files and inflates them with -`DecompressionStream`, so the payload stays around 1 MB for all 18 versions. It +`DecompressionStream`, so the payload stays about 1.2 MB for all 18 versions. It sniffs the gzip magic bytes first, so it works whether your host leaves `Content-Encoding` unset or maps the `.gz` extension to `Content-Encoding: gzip` (as Vite's dev server and nginx's `gzip_static` do), diff --git a/docs/reference/slim-schema-format.md b/docs/reference/slim-schema-format.md index b0bbc09c..d79b8487 100644 --- a/docs/reference/slim-schema-format.md +++ b/docs/reference/slim-schema-format.md @@ -30,7 +30,7 @@ flat `Record`. `types.json` is a flat `Record`, shared by every version. Files are gzipped and inflated by the source. `httpSource` uses -`DecompressionStream` so the payload stays around 1 MB. It sniffs the gzip magic +`DecompressionStream` so the payload stays about 1.2 MB. It sniffs the gzip magic bytes first, so it works whether the server leaves `Content-Encoding` unset or sets it for the `.gz` extension, where the client inflates the body itself. diff --git a/docs/reference/typescript/schemas.md b/docs/reference/typescript/schemas.md index 6798842d..a7846800 100644 --- a/docs/reference/typescript/schemas.md +++ b/docs/reference/typescript/schemas.md @@ -5,7 +5,7 @@ title: '@idfkit/schemas' # `@idfkit/schemas` EnergyPlus epJSON schemas for all 18 supported versions, content-addressed so -that the whole set is around 1 MB gzipped rather than 11.9 MB. See +that the whole set is about 1.2 MB gzipped rather than 12.3 MB. See [Content-addressed schemas](../../explanation/content-addressed-schemas.md) for why, and [Slim schema format](../slim-schema-format.md) for what a definition contains.