Repository navigation
Conversation
Overall package sizeSelf size: 36.44 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------|🤖 This report was automatically generated by heaviest-objects-in-the-universe |
055b23c to
d0ae57d
Compare
d0ae57d to
b779b13
Compare
WASM size comparisonCompared
Negative changes reduce size. libdatadog: 21 changed, 25 unchangedInline artifact layers
Raw WebAssembly sections
Code by Rust crate
remote config: 0 changed, 43 unchangedInline artifact layers
Raw WebAssembly sections
Code by Rust crate
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b779b13613
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "scripts": { | ||
| "benchmark:agentless": "npm run build:wasm:binary && npm run inline:wasm && node benchmark/agentless-pipeline.js", | ||
| "build:wasm": "npm run build:wasm:binary && npm run build:remote-config:binary && npm run inline:wasm && npm run inline:remote-config", | ||
| "build:wasm": "npm run build:wasm:binary && npm run build:zstd:binary && npm run build:remote-config:binary && npm run inline:wasm && npm run inline:zstd && npm run inline:remote-config", |
There was a problem hiding this comment.
Nit: could we simplify all those long scripts to small ones?
Consumers that only need Zstandard compression currently load the exporter, DDSketch, and their transitive Rust code. Build compression as a separate WASM crate and expose it through a typed subpath while keeping the root API as a lazy compatibility wrapper. The direct entry point is 29,989 JavaScript bytes instead of 227,604 (86.8% less loaded code). The package grows by about 28 KiB so existing consumers remain compatible.
The root zstd_compress wrapper now loads the dedicated artifact, but the optimization flags and Binaryen profile were scoped to the original WASM crate. Apply them to both compression crates so the compatibility path retains the measured Zstandard optimization.
The split Zstandard profile omitted the Binaryen --disable-gc guard, so Node.js 18 could reject the generated module. Restore the guard used by the existing WASM profile. The package command serialized each artifact build and inline step. Run the artifact pipelines concurrently while preserving each build-before-inline dependency.
The compatibility wrapper resolved the split Zstandard binding on every compression call. Cache it after the first use while preserving lazy loading for consumers that do not use Zstandard.
b779b13 to
01d5d56
Compare
Builds Zstandard compression as a separate WASM crate and exposes typed CJS and ESM subpaths. The root API remains compatible through a lazy wrapper.
The direct entry point is 29,989 JavaScript bytes instead of 227,604, reducing loaded code by 86.8%. The published package grows by about 28 KiB.
Tested with the complete 49-test package and type suite, dependency validation, Clippy, and ESLint.