.NET Core Api slow response

Yesterday I thought the published WebAPI is not very fast. Typically, each request takes about 300ms in the local environment (Release mode). To make sure my own code was not a problem, I created a new web application in Visual Studio 2017 and selected the "WebAPI" project. When I start a new project in release mode and ask for a value controller that only returns ["value1", "value2"], I get response times that fluctuate between 50 and 100 ms. If I create a new WebAPI.NET Core project, I get the worst result: values ​​between 100 and 200ms. For me, these are very bad results for local environment and receiving small amounts of data.

If you create a new project - this is the response time:

  • faster?
  • more stable (doesn't fluctuate between 100 or 200ms)?

And are there any suggestions I could try to speed up my API. I can't believe it sometimes takes 200ms to request literally less than a kilobyte.

I mean: even this online API is much faster and returns more data: https://jsonplaceholder.typicode.com/posts (about 20ms)

+3


source to share





All Articles