0

I have a "simple" method in which I have a stopwatch that tracks the timing of the for parts.

My stopwatch told me:

  • Part1: 2ms
  • Part2: 20ms
  • Part3: 300ms
  • Part4: 5ms

TOTAL: 327ms

When I call my service from Postman the "Time" of the single call works like this:

  • First call: 1.8s
  • Second call: 8s
  • Third call: 8s
  • and so on

So, there are two questions:

  • Why the method tooks 300ms and the response 2 secs? (uploading 20kb attachment)

  • Why the second and later call took 4 times the time needed for the first one?

Working with a Web App 2 Core 3.5GB Ram on Azure

Thanks!

Ziba Leah
  • 2,484
  • 7
  • 41
  • 60
  • 1
    Ask your telemetry, App Insights has a Performance blade - you go through a little setup, it collects a few things and you get profiler traces! https://learn.microsoft.com/en-us/azure/application-insights/app-insights-web-monitor-performance – evilSnobu Feb 01 '18 at 11:30
  • I connected Application Insight but he seems to work only with the ActionController and not with the ApiController. Where can I change his behauvior? – Ziba Leah Feb 01 '18 at 12:12
  • Did you enable the profiler from the Performance blade? It shouldn't matter what type of application it is, the profiler collects and massages ETL data. – evilSnobu Feb 01 '18 at 12:41
  • I find out that the File.IO.Write / File.IO.Delete is destroying performance. How can I save for local operations a file on my webservice w/o impact on performance? – Ziba Leah Feb 01 '18 at 12:51
  • 1
    Write to `d:\local`, it's a temporary drive that gets wiped on Web App restart (so don't use it for anything remotely important). I believe it's exposed as %TEMP% or %TMP% as well. – evilSnobu Feb 01 '18 at 13:21
  • 1
    Yup, check all predefined env vars here: `https://{appname}.scm.azurewebsites.net/Env.cshtml` – evilSnobu Feb 01 '18 at 13:24

0 Answers0