Taking time to hit the controller after API is called?

Viewed 23

My question is not about Service slowness or Repository slowness. My question is about : After i call the API it takes 16seconds to hit the controller so i'm wondering what is between the api call and controller. What might be the issue? . But some other api it takes less than 1 second to hit the controller. I'll share the controller code which is taking time to hit.

Controller code:

        [HttpGet]
        [Route("GetPatientAppointmentList")]
        public JsonResult GetPatientAppointmentList(string locationIds = "", string staffIds = "", string patientIds = "", DateTime? fromDate = null, DateTime? toDate = null, string patientTags = "", string staffTags = "", string timeZone = "India Standard Time", bool isHistory =false, string searchText = "")
        {
            return Json(_patientAppointmentService.ExecuteFunctions(() => _patientAppointmentService.GetPatientAppointmentList(locationIds, staffIds, patientIds, fromDate, toDate, patientTags, staffTags,isHistory, searchText, GetToken(HttpContext))));
        }

My problem is not about api reponse time. Is there any probable reason that might be causing this issue. My asp.net core version is 2.1

0 Answers
Related