web application – Return of APIREST takes too long

I have problems with calls to the database that take a long time for the millions of records that exist.

But when I return a list from the webApi, I'm delayed, as in the image, for example.

Azul- Api Returns the listing
Amarillo- UI receives the response from Api

Image of Logs

That is, it takes about 14 seconds!