I am building an Angular app. I was running version 11 and all was fine but after updating to version 14 the httpclient requests are much much slower.
What has changed from those versions? I mean it works but the requests takes like 1 second but used to take 20 ms. The API endpoint is still very fast.
When I run the same page, with the same code in Angular 14 it takes about a second to fetch data from server and render it. This used to take about 100ms all together when running version 11 of angular (no code changes). Naked server request in Postman is very fast (20ms).
My fetch method (in a service)
public fetch(path: any, attributes = {}) {
return this.httpClient.get(this.baseURL + '/' + path, { params: attributes, headers: this.setupHeaders() });
}
Used like this:
this.subs.add(this.apiService.fetch(this.path).subscribe(
(response: any) => {
// Show content
},
(failure: any) => {
this.isFetchingList = false;
}
));
Locally I run the application like this:
ng serve --disable-host-check --no-live-reload
But I get this message when I try to use Angular tools:
We detected an application built with production configuration. Angular DevTools only supports development builds.