Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Why is the Business Central API so slow ?

(0) ShareShare
ReportReport
Posted on by 10

Hello,

We need to synchronize 10000 bookkeeping entries per month and when we do it through the API (using batch of max 100 items).

It takes between 30 minutes and 50 minutes.

In the past the customer was using other accounting Software and it was 5 times faster?

How can we improve the speed?  

  • Samantha73 Profile Picture
    Samantha73 2,490 on at
    RE: Why is the Business Central API so slow ?

    One of the options you can try in this scenario is first inserting into a staging table and then performing only required validations before inserting into BC tables. Check performance with and without insert validations. Second, can you insert entries in smaller batches? Why can't the bookkeeping entries be entered weekly rather than monthly?

  • Ghetz Profile Picture
    Ghetz 2,983 on at
    RE: Why is the Business Central API so slow ?

    We've also noticed a crazy decrease in overall performance.

    We have been doing migration of some Integration projects we had in NAV 2018/BC14. In the past we had no problem doing real time integrations; but since we have updated to modern development and new platform, all API calls take like 5-10 times more than before. 

    Perhaps this is by design, as now custom fields are in different tables at the database level; so what before required 1 database call, now requires at least 2.

    This is having a huge impact in our integrated apps, as we may have to enable "offline" funcionality and do a async integration in some of the cases.

  • LPaulD Profile Picture
    LPaulD 65 on at
    RE: Why is the Business Central API so slow ?

    If you are still following I tweeted the Dynamics 365 gurus:

    Both Waldo and TobyNav were familiar with the issue. Did you by any chance like me authenticate via NavUserpassword instead of user a WAC (web services access key)?

    For me it was the common link in all my testing and after swapping it out in a rest client the response time dropped from 1300ms to about 10ms in BC21.

    Give it a try....

    medium.com/.../f0aafc37710b

  • LPaulD Profile Picture
    LPaulD 65 on at
    RE: Why is the Business Central API so slow ?

    While optimizing returned data and processing would help in bringing the response time down, my tests show BC21 being 130 times slower calling an OData4 unbound action that doesn't do any data processing (1300ms). It should be lightning fast.

    On BC14 our heavy API operations that hit the DB have a response time between 200ms and 300ms on a LAN. Suppose we bring it down to 100ms? I'm afraid it wouldn't make noticeable difference with a 1300ms overhead.

  • Jarrod Case Profile Picture
    Jarrod Case on at
    RE: Why is the Business Central API so slow ?

    We have found the API slowing down. We would recommend restricting bloat in your API published fields, and/or restart your environment, and if it persists, contact MS Support.

  • LPaulD Profile Picture
    LPaulD 65 on at
    RE: Why is the Business Central API so slow ?

    We have the same observation for OnPrem as well and it's probably not your code or your environment but the BC platform itself.

    From version BC14->BC20->BC21 the API response times increased from 10ms to 1300ms for a simple Pingpong API extension, it's not pulling data from the Database. The extension just returns a string.

    Calling the API to list the companies also a similar respons time. 

    I have tested and added the scripts to replicate the results in Docker on a local machine for those interested in this topic:

    community.dynamics.com/.../1306138

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 993 Super User 2024 Season 1 on at
    RE: Why is the Business Central API so slow ?

    I recommend you raise a support ticket with Microsoft and have them look into your case to see if there is anything in the environment or in the code that cause this performance issue.

    If you are a partner you can do that yourself or contact your CSP partner if you are an enduser,

  • StivoBerlin Profile Picture
    StivoBerlin 10 on at
    RE: Why is the Business Central API so slow ?

    thanks, I saw already all these links, in the past weeks, I have already improved the speed using requests with batches. But now I don't know how to go faster than 30 to 50 minutes for 10'000 bookkeeping entries. If we knew it would be so slow, we would not have chosen Business Central online.

  • Nitin Verma Profile Picture
    Nitin Verma 21,081 Super User 2024 Season 1 on at

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans