Skip to content
Browse standards

Standard ·Markdown source ·View on GitHub

Preparation performance measurements

These measurements establish preparation and serialization costs, not comparative whole-system speed or performance budgets. The static fixture demonstrates negligible HTML size overhead.

Regenerate with node tools/benchmarks/measure.ts. This rewrites this report and retains raw samples and correctness snapshots in benchmarks/latest/ (ignored). Profile separately with node tools/benchmarks/measure.ts --profile.

Conditions

  • date: 2026-10-09T12:37.285Z

  • node: v24.21.0

  • cpu: 13th Gen Intel(R) Core(TM) i7-13620H

  • logicalCpus: 16

  • memoryMiB: 31701

  • warmups: 5

  • repeats: 30

  • shortRepeats: 100

  • percentile: nearest-rank

  • gzip: zlib default

  • device: development machine, no pinned CPU or device profile

  • Warmups are excluded. Each workload records its own count; cold processes have no warmups.

  • p50/p95 use nearest rank; variance is sample variance in squared units. Byte rows are deterministic single observations.

  • Corpus throughput at median elapsed time: 5953.7 documents/second.

Results

WorkloadSamplesp50p95VarianceBoundary
static-100 prepare reused registry3011.662 ms13.836 ms1.211Input and registry constructed outside timing; uncached preparation.
static-100 input clone1000.135 ms0.172 ms0.000Cloning only.
static-1000 prepare reused registry30113.095 ms130.156 ms42.403Input and registry constructed outside timing; uncached preparation.
static-1000 input clone1001.329 ms1.389 ms0.007Cloning only.
static-10000 prepare reused registry301244.365 ms1272.924 ms1722.728Input and registry constructed outside timing; uncached preparation.
static-10000 input clone10014.299 ms16.394 ms1.069Cloning only.
registry construction10049.380 ms52.847 ms8.744Includes declaration checks and registry identity.
static-1000 prepare new registry30155.313 ms159.733 ms5.082Registry construction plus uncached preparation.
static-1000 repeated same input30109.569 ms112.956 ms2.103Repeated uncached preparation; no memoization.
static-1000 fixture construction1000.648 ms0.699 ms0.145Authoring helpers and fixture creation only.
static-1000 end-to-end30160.527 ms176.903 ms35.423Fixture construction, cloning, registry construction, preparation and serialization.
static-1000 publication serialization1001.567 ms1.761 ms0.014Already prepared document.
publisle static html151946.000 bytes51946.000 bytes0.000Publication HTML only.
publisle static html gzip12746.000 bytes2746.000 bytes0.000Default zlib compression.
matched static html151927.000 bytes51927.000 bytes0.000Handwritten HTML for the same sentences; no competing compiler.
matched static html gzip12732.000 bytes2732.000 bytes0.000Default zlib compression.
matched mdx source152889.000 bytes52889.000 bytes0.000Source only; MDX compilation is unsupported.
islands-5 prepare301.374 ms1.461 ms0.016Uncached preparation only; cloning, mounting and serialization excluded.
islands-5 html12648.000 bytes2648.000 bytes0.000HTML only; excludes host bundles and network delivery.
repeated-100 prepare3022.620 ms23.811 ms0.237Uncached preparation only; cloning, mounting and serialization excluded.
repeated-100 html151256.000 bytes51256.000 bytes0.000HTML only; excludes host bundles and network delivery.
distinct-20 prepare303.353 ms3.693 ms0.012Uncached preparation only; cloning, mounting and serialization excluded.
distinct-20 html16406.000 bytes6406.000 bytes0.000HTML only; excludes host bundles and network delivery.
inline-code-100kb prepare302.602 ms3.009 ms0.063Uncached preparation only; cloning, mounting and serialization excluded.
inline-code-100kb html1100156.000 bytes100156.000 bytes0.000HTML only; excludes host bundles and network delivery.
corpus-10000 prepare301679.635 ms1756.027 ms7441.658Sequential whole-corpus elapsed time; reused registry.
contract-graph-1000 walk1000.105 ms0.123 ms0.000Identity and edge checks only; no schema compilation.
static-1000 process-cold prepare30145.618 ms162.395 ms125.978First prepare in each fresh process; registry and fixture already constructed.
static-1000 process start-to-exit30361.464 ms391.323 ms491.635Parent elapsed time including process startup, imports, registry, fixture and first preparation.

Profiling findings

The preparation analysis records the optimization and its before/after evidence. Canonical JSON byte accounting now avoids buffer allocations for small emitted fragments and retains native encoding for large strings. Declaration validation, JSON bounds and identity semantics remain unchanged.

Limits

  • Budgeted prepare rows stay uncached. A separate host compilation cache reuses unchanged corpus documents and is not a numerical cap.

  • HTML sizes exclude CSS, JavaScript, island props delivered separately, requests, activation latency and reader memory.

  • Repeated paragraphs compress unusually well; mixed-content size comparisons remain follow-up work.

  • Inline code text is not fetched dataset delivery. Island preparation does not measure browser mounting or selective bundle loading.

  • MDX compilation, other publishing toolchains and browser delivery measurements remain unsupported.

  • Timing variability reflects this machine and execution order; cold processes are reported separately from warmed workloads.