Performance issue between debug and real mode

Options

Hello,

I need some help on a subject that I can't understand with Xano.

I have created a POST endpoint, which I want to use many times via my Bubble application.
During my tests (in debug mode) I usually reach a loading time of 2/3 seconds.


My action via bubble is to make a POST request from this endpoint ten or twenty times simultaneously. (I create 10/20 api calls from this endpoint at the same time).
In this situation when I go to see the details api request history of xano, I see that the loading time of each request is about 30/40 seconds... I do not understand.
So I selected one of these 30/40 seconds requests and I restarted it in debug/mode on the same endpoint with the same data source & the same inputs : result finished in 2.15 seconds.


How can I go from 2.15 seconds in debug to 30/40 seconds in live?

Is it due to the fact that there are several requests almost at the same time? (yet an endpoint of an xano api is supposed to be used at the same time by many people)

I thought that the launch plan would be enough for some data before our company grows


If you had a solution it would be incredible... my algorithm works but is incredibly slow...


Attached some screenshots that may help you to understand.

Thanks in advance,

Gabriel

Answers

  • Dimo
    Dimo Member
    Options

     just made a new test maybe it will be easier to understand

    the 1st screen shows a request among the 20 requests transmitted at the same time : duration 39,30 seconds.

    the 2nd screen shows the same request but done alone: duration 2.90 seconds.

    Both requests were transmitted via Bubble (the only difference is that one was transmitted alone, and the other one at the same time as other requests)

    I hope this can help to understand better

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    edited April 2023
    Options

    There can be a few culprits here, but you are right that the real performance issues only show up under load. Looking at your screenshots, it Seems like you have a for-each loop that is taking up the lions share of the time. What's inside there? That would help you diagnose next steps.

    Managing performance bottlenecks is often part of the hardest 5% of the project, and one that really matters as we start shipping. This is a key topic we work on in our group office hours and ask-for-help discussions at Statechange Pro (https://statechange.ai).