Recommended Free Tools
In one Angular 22 production-build benchmark, a bare httpResource call added 6.1 kB of gzipped main.js over a plain HttpClient baseline. That is a result from one configuration, not a fixed cost for every Angular app. The same test found that generator choice and import style could change bundle growth substantially.
What the benchmark measured
Konstantin’s comparison used the YouTube Data API v3 OpenAPI specification, described as containing 76 endpoints. The test generated clients for a minimal Angular 22 app, built with Angular’s production esbuild application builder, and measured gzipped production main.js size. It compared builds exercising either one or eight endpoints. The plain HttpClient control was 38.4 kB gzip; each number below is additional gzip size over that baseline, not the total bundle size.
The author reports the benchmark command as npm run bench. See the benchmark article for the setup and reported results.
| Variant | One endpoint: growth over baseline | Eight endpoints: growth over baseline |
|---|---|---|
Bare httpResource, no generator |
+6.1 kB gzip | +6.1 kB gzip |
openapi-resource-gen, httpResource |
+7.1 kB gzip | +7.2 kB gzip |
openapi-resource-gen, HttpClient |
+0.9 kB gzip | +1.0 kB gzip |
| Orval 8, Angular client, tags-split services | +0.3 kB gzip | +1.2 kB gzip |
| ng-openapi-gen 1.1, deep imports | +1.9 kB gzip | +2.3 kB gzip |
ng-openapi-gen 1.1, functions barrel |
+7.0 kB gzip | +7.0 kB gzip |
Hey API client-angular |
+3.5 kB gzip | +3.5 kB gzip |
These are the author’s measurements for that app, builder, generated code, and gzip output. They are not runtime measurements, nor do they establish the size of every emitted asset. The comparison did not test Orval’s httpResource mode.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
What the results say about httpResource
The measured increment was in the bare API control
The benchmark’s bare httpResource build was 6.1 kB gzip larger than its plain HttpClient control, whether one or eight endpoints were exercised. In the author’s own generator, the httpResource variant added 7.1–7.2 kB, while its HttpClient variant added 0.9–1.0 kB. The first pair is consistent with the bare API result plus roughly 1 kB of generated-code growth in this setup; it does not show that every generator or app will have that relationship.
Generated output and imports can matter as much as the API choice
Endpoint count alone did not predict the measured result. The author reports that the ng-openapi-gen functions barrel retained considerably more code than deep imports. Their explanation is that a side-effecting assignment, fn.PATH = '…', prevented unused functions from being removed when imported through the barrel in this test. Orval’s tags-split services were especially small for one exercised endpoint, while the eight-endpoint case had greater growth; service granularity can make the retained amount track touched tags rather than individual operations.
Rank #2
These are explanations of the benchmark’s observed output, not universal guarantees about tree shaking. Generated code, import paths, bundler behavior, and what the application actually references all affect what remains in a production bundle.
Why Angular offers httpResource
Angular documents httpResource as a reactive wrapper around HttpClient, exposing request status and response through signals. Unlike a standard HttpClient Observable request, which starts when subscribed to, httpResource initiates its request eagerly. If a signal used to form the request changes, it issues another request and cancels a still-pending previous one. It also supports HttpClient features such as interceptors and testing. See Angular’s reactive data fetching guide and API reference.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsRank #3
The default response parsing is JSON. Angular documents .text(), .blob(), and .arrayBuffer() subconstructors, as well as a parse callback for validating or transforming a response. Options include defaultValue, injector, equal, and debugName; their meanings are specified in the HttpResourceOptions API. Angular advises using HttpClient APIs for mutations such as POST or PUT rather than httpResource. The API reference labels httpResource stable since Angular v22.0, so confirm the API status for the Angular version in your project.
How to use the result for your application
Treat the table as a reason to measure, not as a size forecast. The article describes one OpenAPI specification and minimal app, a single production builder, and gzip-only bundle growth. A different Angular or generator version, import pattern, set of used operations, builder, or compression method can produce a different result. The figures do not establish request latency, memory use, build speed, or runtime performance.
Rank #4
- Set the comparison target. Use your project’s Angular version, production builder, generated client version, and the operations your app actually imports and uses. Compare the same application with a plain
HttpClientcontrol and with thehttpResourceor generator variant you are considering. - Hold the build and metric constant. Build each variant under the same production configuration and compare the same output measure, such as gzipped
main.js. Do not compare one build’s gzip size with another build’s uncompressed total or all-assets size. - Check the imports and generated output. If a generator offers deep imports and barrel imports, measure the form your code uses. Look for side effects or service organization that may retain code beyond the operations you intended to include.
- Repeat for realistic usage. Compare both a small and representative set of used endpoints or services. A single-operation result can miss growth caused by service or tag boundaries.
- Record versions and configuration with the result. Bundle output can change as Angular, generators, or build tooling change. The benchmark article identifies
npm run benchas its reproduction command; verify its current script and dependencies before using it as a direct comparison for another project.
Choosing between HttpClient and httpResource
If the principal decision is bundle size, the benchmark favors its plain HttpClient control over its bare httpResource control for this particular production build. That does not settle the broader API choice: httpResource supplies signal-oriented reactive reads and eager request behavior, while HttpClient provides the underlying Observable API Angular recommends for mutations. Choose based on the application’s data-flow needs, then measure the production bundle with the exact generated code and imports the app will ship.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




