Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Suggested answer

SearchResourceAvailabilityForRequirementGroup is too slow

(0) ShareShare
ReportReport
Posted on by 30

In our production system we have seen that the calls to SearchResourceAvailabilityForRequirementGroup are some times slower than 7 secs.

Looking in app insights we can see that the following plugin is the main issue. For instance in a call to availability API that took 19.7 seconds (!!??) the plugin took 9.4secs.

Microsoft.Dynamics.ScheduleCommon.Fps.FpsPlugin
Duration | 9.4 s

Another step that also contributes to the overall time is this..
SDKmsdyn_RetrieveRequirementGroupCandidates
Duration | 6.3 s

Why is the API so slow?

  • Suggested answer
    Gabriel Dias Junckes Profile Picture
    Gabriel Dias Junckes 2,435 on at
    RE: SearchResourceAvailabilityForRequirementGroup is too slow

    Hi.

    Interesting, I worked with Microsoft on the performance of this API some time ago but it was related to the Bing Map API (Travel time calculation).

    I don't know if you notice but it is very slow to load an app for the first time. It takes more than a minute to load the home pages sometimes. 

    It is maybe something that Microsft switches off when the resource is inactive. I notice the difference when the environment type is production.

    Do you catch anything using the Application Insights?

    Analyze model-driven apps and Microsoft Dataverse telemetry with Application Insights

  • HectorMeneses Profile Picture
    HectorMeneses 30 on at
    RE: SearchResourceAvailabilityForRequirementGroup is too slow

    I don't think this is the issue.

    We get good response times from the API once it has been used for a bit. But if it is cold the first 2 or 3 requests take a long time.

    Looking in app insights I can see this behavior:

    - The API is called after some period of inactivity.

    - A workflow is retrieved. Here there's a considerable gap in execution of around 5 secs! From reading about Actions, they are executed as real time workflows. But in this case it looks like it is not real-time at all. 

    - There's another gap in between the msdyn_schedulingparameter call and the webrsource one. 3 secs..

    - The gaps become smaller as the API is used. Here, maybe something is raising the priority of the associated workflow? or SQL is also caching the plans and data for the API...Not sure.

    pastedimage1656512735563v1.png

    Also, we have noticed that the API slows down if we are creating bookable resource bookings ( which is why I was asking about NOLOCK clause in another thread ).

  • Suggested answer
    Gabriel Dias Junckes Profile Picture
    Gabriel Dias Junckes 2,435 on at
    RE: SearchResourceAvailabilityForRequirementGroup is too slow

    Hi.

    It may be related to the search you are running.

    Consider those options:

    - Disable the time travel and distance if you are not using;

    - Reducing the gap between the start and end dates;

    - Limit the query for top 10 resources;  

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: SearchResourceAvailabilityForRequirementGroup is too slow

    Hi.

    It may be related to the search you are running.

    Consider those options:

    - Disable the time travel and distance if you are not using;

    - Reducing the gap between the start and end dates;

    - Limit the query for top 10 resources;  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans