Sitelet https://github.com/constantant/angular-openapi-gen/pull/86
Skip to content

docs: add a reproducible bundle-size benchmark - #86

Merged
constantant merged 1 commit into
masterfrom
feat/bundle-benchmark
Oct 2, 2026
Merged

constantant merged 1 commit into
masterfrom
feat/bundle-benchmark

Conversation

@constantant

Copy link
Copy Markdown
Owner

Roadmap #5 deliverable 3. npm run bench (tools/bench/run.mjs) builds minimal Angular 22 production apps using 1 or 8 endpoints of the YouTube spec with each tool and prints sizes; results and caveats are in docs/benchmarks/bundle-size.md.

Headline (gzip, 8 endpoints, vs plain HttpClient): ours httpResource +7.2 kB (of which +6.1 is Angular's own httpResource), ours httpClient +1.0, Orval +1.2, ng-openapi-gen +2.3 with deep imports (+7.0 via its barrel, which doesn't tree-shake), Hey API +3.5. So the one-file-per-endpoint design tree-shakes cleanly, but we are not smallest in the default flavour; the doc says so.

The README gets a one-paragraph summary and link. Not run in CI (needs network and installs five tools).

🤖 Generated with Claude Code

tools/bench/run.mjs installs Angular and the latest openapi-resource-gen, Orval,
ng-openapi-gen and Hey API into a throwaway workspace, generates a client from the
76-endpoint YouTube spec with each, builds minimal production apps that use 1 or
8 endpoints, and prints main.js sizes (raw and gzip) next to two controls (plain
HttpClient, bare httpResource).

Findings are in docs/benchmarks/bundle-size.md, including the unflattering one:
the default httpResource flavour is not the smallest, because Angular's own
httpResource runtime is most of the cost; the httpClient flavour is on par with
Orval.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@constantant
constantant merged commit 495f645 into master Oct 2, 2026
9 checks passed
@constantant
constantant deleted the feat/bundle-benchmark branch October 2, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant