I have an Angular 5 site that receives data from a REST API, something like 1-4 requests to the API each page, and what happens is that the requests sometimes take a long time(and sometimes not).
Now, all the requests are being performed in one function using Observable :
return this.http.post(url, {headers: this.header})
.map(res => res.json())
.catch(this.handleError)
my question is - could it be that the slow process is happening because an Observable is being used? Would Promises will be better for the performance? Or is there no difference between an Observable and a Promise in performance context?