docs: add a reproducible bundle-size benchmark - #86
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 indocs/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