Free tools Windows power users keep installed
One-click scans. No signup required.
In one Angular 22 production-build benchmark, a bare httpResource call added 6.1 kB gzip over a plain HttpClient baseline. That is a result for one app, builder, API specification, and set of imports—not a fixed cost for every Angular project. The same benchmark found that the generator and import pattern could change the result substantially.
What the benchmark measured
Konstantin’s benchmark generated Angular clients from the YouTube Data API v3 OpenAPI specification, which the article describes as containing 76 endpoints. The test used a minimal Angular 22 app, the production esbuild application builder, and either one or eight exercised endpoints. It measured the gzip size of production main.js, reporting growth over a 38.4 kB gzip plain-HttpClient baseline. The author identifies npm run bench as the command for repeating the benchmark. See the benchmark and its setup.
The values below are reported gzip growth over that 38.4 kB baseline; they are not total bundle sizes.
| Tested variant | One endpoint | Eight endpoints |
|---|---|---|
Bare httpResource, no generator |
+6.1 kB | +6.1 kB |
openapi-resource-gen, httpResource |
+7.1 kB | +7.2 kB |
openapi-resource-gen, HttpClient |
+0.9 kB | +1.0 kB |
| Orval 8, Angular client, tags-split services | +0.3 kB | +1.2 kB |
| ng-openapi-gen 1.1, deep imports | +1.9 kB | +2.3 kB |
ng-openapi-gen 1.1, functions barrel |
+7.0 kB | +7.0 kB |
Hey API client-angular |
+3.5 kB | +3.5 kB |
These figures are the author’s reported results for that configuration; the article does not establish equivalent results for other Angular versions, builders, specifications, compression settings, or import patterns.
#1 Best Overall
Why httpResource can change the bundle
Angular describes httpResource as a reactive wrapper around HttpClient. It exposes request status and response through signals and starts a request eagerly. By contrast, an HttpClient Observable request starts when it is subscribed to. When a signal used to form an httpResource request changes, Angular issues a new request and cancels a still-pending previous one. The API also supports HttpClient features such as interceptors and testing. Angular’s guide to reactive data fetching explains these behaviors.
A larger bundle in this benchmark means the tested production build retained more code with the httpResource path than with its plain-HttpClient control. It does not show that every application pays the same increment, nor does it isolate a universal per-call surcharge.
Rank #2
What the generator results reveal
Generated code can add little beyond the API choice
In the benchmark, the author’s openapi-resource-gen version using httpResource grew from +6.1 kB for bare httpResource to +7.1 kB with one endpoint and +7.2 kB with eight. Its HttpClient mode measured +0.9 kB and +1.0 kB respectively. In this setup, the generator and exercised endpoint count contributed relatively little compared with the difference between the bare API controls.
Import shape can outweigh endpoint count
ng-openapi-gen 1.1 measured +1.9 kB with one endpoint and +2.3 kB with eight when using deep imports, but +7.0 kB in both cases through its functions barrel. The benchmark author attributes the barrel result to a side-effecting assignment, fn.PATH = '…', which caused functions to be retained in that test. The result is a reminder to evaluate the imports your application actually uses rather than assuming a generator’s output will tree-shake identically in every import pattern.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteRank #3
Service grouping affects what is retained
Orval 8’s Angular client with tags-split services measured +0.3 kB for one endpoint and +1.2 kB for eight. The author’s interpretation is that class-based services scale with the tags touched by the app, not simply with the number of individual endpoints. That is an observation about this generated output and test, not a guarantee for every Orval configuration.
What httpResource is—and is not—intended for
httpResource is suited to reactive reads: requests whose inputs may depend on signals and whose current status and value are useful to expose reactively. Its response defaults to JSON. Angular documents .text(), .blob(), and .arrayBuffer() variants for other response formats; a parse callback can validate or transform the raw response, including through a schema library. Options include defaultValue, injector, equal, and debugName. See the HttpResourceOptions API.
Rank #4
Angular advises using the underlying HttpClient APIs for mutations such as POST and PUT rather than httpResource. The resource model is intended for reads because in-progress loads may be cancelled. The Angular guide covers that distinction.
The API reference currently labels httpResource stable since Angular v22.0. Because stability labels and APIs can change, check the current API reference against the Angular version in your project.
Recommended Free Tools
How to measure the cost in your application
Use a controlled production-build comparison. Keep the app, builder, compression method, generator version, and exercised operations the same; change the API or import pattern being evaluated. Compare the same emitted asset and report whether the number is gzip growth or total size.
- Build a control using the plain
HttpClientapproach already supported by your app. - Build a matching variant using
httpResourceor the generator and import pattern you are considering. - Include the same number of actually used operations in each variant, and retain the same production builder and configuration.
- Compare gzipped production
main.js(or the corresponding application bundle in your build), noting Angular and generator versions, builder, import style, and operation count. - Repeat after changes to versions, generated output, imports, or build configuration that may affect tree-shaking.
The benchmark article’s npm run bench command is specific to its own benchmark project; it is not an Angular CLI command for arbitrary apps. Its measurements concern compressed production main-bundle size only. They do not establish runtime speed, request latency, memory use, build time, or the size of every emitted asset, and the cited evidence does not include an independent replication.
Choosing between httpResource and a generator
Bundle size is one input to the decision. Compare alternatives under the conditions that match your application:
- Measure growth with the same number of used operations, not the generator’s full theoretical API surface.
- Test the imports your code will use, including barrel versus deep imports where the generator offers both.
- Consider whether the application needs signal-based reactive reads or whether plain
HttpClientfits its request flow. - Keep Angular and generator versions, production builder, and compression metric consistent when comparing results.
For another Angular version or build configuration, the benchmark’s exact figures are not established. Treat +6.1 kB gzip as a useful warning to measure the trade-off in your own production build, not as a universal price of using httpResource.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →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.

