web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

BC19 ODATA V4 - bad response time

(0) ShareShare
ReportReport
Posted on by 5

I published a very simple codeunit as ODATA V4 endpoint:

codeunit 50000 "Webservice V4"
{
    procedure Ping(request: Text): Text
    begin
        exit(request);
    end;
}
The response time (Transfer Start in postman) is >400ms.. :-( In my opinion it should be less than 100ms.. 
Any idea?
Its a local service with credential type "NavUserPassword"..
Thanks in advance!
I have the same question (0)
  • Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    And the response time is constant if you run it repeatedly ?

  • MarKun Profile Picture
    5 on at

    Thank you for the response!

    Yes, the response time is +/- constant.. Between 400ms and 450ms

    Kind regards

    Martin

  • JAngle Profile Picture
    133 on at

    An api page would provide improved performance. Tiering wise it is api, odata then soap

  • YUN ZHU Profile Picture
    95,729 Super User 2025 Season 2 on at

    Hi, as Josh mentiond, the API is the preferred way to integrate with Business Central. 

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/web-services#api-web-services

    pastedimage1650507460586v1.png

    Info from Directions NA.

    pastedimage1650507490812v3.png

    Hope this helps.

    Thanks.

    ZHU

  • MarKun Profile Picture
    5 on at

    I tested with a very simple API Page based on a temporary table.

    Unfortunately the response time of the api is equal to the OData V4.. More than 400ms..

  • LPaulD Profile Picture
    73 on at

    Hi Martin,

    Did you ever find a solution?

    I landed here with the same observation. We've implemented a solution based on OdataV4 unbound actions for BCv14 and it's quite fast. 50ms response time for simple queries. Today we setup a test server with an upgraded database to BCv20 and everything is 1000ms+ often worse.

    Fingers crossed its an easy fix and not a reimplementation

  • MarKun Profile Picture
    5 on at

    Hi Paul

    Unfortunately I did not find a solution - we had this issue in BCv19 and BCv20 OdataV4 and API.. So we had to switch to an ASP-Solution :-(

    I hope for BCv21..

  • LPaulD Profile Picture
    73 on at

    Hi Martin,

    That is too bad: perhaps my work today can help you and others in a better path forward:
    Our partners support team indicated that the problem probably was our setup which implies the meter will start running (it's their default response ) so I did a little more testing.
    Created a basic extension called PingPong which takes a string and returns a string, nothing more.
    Tested the following situations, each time testing response times against our current BC14 vs a local docker build with BcContainerHelper.
    The local docker build should theoretically show a better response time as it doesn't take a trip over the internet.
    The test pc is a beast with i9 and 32GB of ram.

    The latter API test as yzhums indicated that Microsoft recommended the API path forward but it's performance also worsened with BC20 -> BC21.

    I hope anyone can verify these results and could share Microsofts view on this?

    I hope I have a wrong setting or biased setup. 
    We refactored a large part of our WMS to work with BC webservices providing a future proof path but it seems now this was a bad call. Imagine having to make consecutive API/OData calls for an order pick and waiting 20 seconds for a result with each scan? 

  • LPaulD Profile Picture
    73 on at

    Performed two further tests with OnPrem images which might be better suited for local testing:

    https://bcartifacts.azureedge.net/onprem/21.2.49946.49990/nl
    https://bcartifacts.azureedge.net/onprem/14.0.29537.0/nl

    So to summarize  MarKun  BC21 doesn't seem to perform better and even significantly worse than previous versions.
    Please prove me wrong @anyone

    BC Version PingPong Response Time
    BCv14 10ms
    BCv21 1308ms
    (I actually did a few calls to get the lowest number here)


    Script for replication:

    Install-Module BcContainerHelper -Force
    
    $containername = 'Nav365v21'
    
    $Username = 'paul'
    $Password = '*****************'
    $SecureString = ConvertTo-SecureString -AsPlainText $Password -Force
    $credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Username,$SecureString 
    
    
    New-BcContainer -accept_eula: $true `
                     -containername $containername `
                     -auth NavUserPassword `
                     -credential $credential `
                     -doNotExportObjectsToText `
                     -updateHosts `
                     -assignPremiumPlan `
                     -accept_outdated:$true `
                     -artifactUrl "https://bcartifacts.azureedge.net/onprem/21.2.49946.49990/nl" `
                     -multitenant:$false `
                     -isolation process




    pastedimage1672428697109v1.png

    pastedimage1672428865436v3.png

    codeunit 50001 "Ping"
    {
        trigger OnRun()
        begin
    
        end;
    
        procedure Ping(Pong: Text): Text
        begin
            exit(Pong);
        end;
    }

  • Verified answer
    LPaulD Profile Picture
    73 on at

    Hi Martin,

    If you are still following I've made a blog post about this and 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 using a WAC (web services access key)?

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

    Give it a try....

    medium.com/.../f0aafc37710b

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,468

#2
YUN ZHU Profile Picture

YUN ZHU 923 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 607

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans