Bubble X Xano

Options

Hello,

I have been using bubble for 5 years now and I think Xano could help me to solve a performance problem on bubble.

I explain you my problem.

I have a database of 1000 events.
I need to copy quickly a part of these 1000 events (about 200 or 300). For each copied event I need to use the google matrix api to add and subtract seconds to each event according to a travel time.

Is it possible to do this action quickly via Xano?

On bubble it works but it's very long.

I started to test on Xano, I managed to copy via bulk record quickly my events but I don't really know how to use the google api for each item of this event list.

Someone could help me or tell me if it is possible to do this via Xano?

Thanks

Gabriel

Comments

  • Lachlan
    Lachlan Administrator

    ADMIN

    Options

    Hi Gabriel,

    This sounds like something that you should be able to achieve with Xano. I'd hope we could achieve a more performant response time than your current workflow. We often hear reports of improved performance from bubble users however I'm sure it depends on each use case.

    As a general idea, it sounds like we are wanting to use some form of a loop.

    So essentially we will be querying all records from the events table. This might include a custom query to only return the records that need to be updated by some identifier within this table.

    We would then use a loop, such as a for each loop, and we will loop through the returned list of records from your events table.

    For each loop, we are then able to reference the particular event and within this loop, we could send an External API request to the google api. This will then return a result. Based on this result we could then do an edit record function to update the event table.

    Let me know if you have any queries!

    Regards,
    Lachlan.





  • Dimo
    Dimo Member
    Options

    Hello Lachlan,

    Thank you for your help and for your message.

    After a few tries I managed to get the result I wanted.

    However I am a little disappointed with the speed of processing when dealing with a large amount of data.

    But as I am a novice on Xano it is possible that my method can be optimized.
    Here is the screenshot of my endpoint (if you need more details about my functions don't hesitate to ask me).
    According to you is a good way to do? or should I change some elements to improve the speed?

    // performance :

    • If I send 20 events indeed it is very fast and the processing is done in less than 1 second.
    • If I send 230 events unfortunately the delay reaches about 10 seconds.
      -> I suppose that this long delay is due to the fact that there is a loop and that there is the external api of google inside this one ?

    Do you think it is possible to improve some things to improve the performance?

    // current logic on Xano

    • Bulk record of x events
    • for each of these items make a loop.
    • get the record in question to access the sub path
    • If the geographical address of the event is empty, go to the next iteration
    • If the geographical address of the event is not empty continue
    • request api google matrix between the event's geographic address and another address
    • modify a variable of the record in question by adding/subtracting the result of the API request

  • Dimo
    Dimo Member
    Options

    Small additional question about the functioning of xano in general.

    I have a little difficulty to understand when I can access or not the sub path of a variable.

    At some time it is possible to access it, at other times not, so you have to make a get record to be able to access it afterwards, right?

    Is it related to the loop?

    Thanks again for your help.

  • Dimo
    Dimo Member
    Options

    edit :

    If there is no improvement possible via the architecture of the functions.

    Can switching to the paid plan speed up the processing time?

    Or can switching to the scale x1 plan speed up the processing time?

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    Hi, Dimo. I'm not sure the Get Record is necessary; you can reference the original input and loop through that, potentially. That is the only suggestion I think I can make at this time.

    In general regarding performance, because you are currently on our Build plan, you are sharing server resources with other Xano users. This means that resources are low, and speed can fluctuate. Moving to any of our paid plans will give you dedicated resources and increased speed.

    Specifically regarding Bubble, because Bubble proxies all API requests via their API connector, there is an additional delay. There are plenty of cases where this is not enough to make a measurable difference, but it's worth mentioning.

  • Dimo
    Dimo Member
    Options

    Hello Chris,

    Thank you for your help.

    1. Indeed the "get record" did not seem necessary to me either but without it, I cannot access the sub path of my object. If I refer to my original input which is an object I can only access the object itself (see screenshot).
    2. Yes indeed I saw your thread on the delay of the api connector of bubble, that's why all the tests I did above were done only with the run and debug of Xano.
    3. Great news for the paid plan that could increase performance. I will test it soon.
    4. One last question I'm stuck on concerns the continuation of my algorithm.

    Via the previous POST request I manage to transform all my elements.

    Now I have to make a GET request of several events in the database.

    I have tested the fuzzy search but I don't think it fits my use case, maybe you can help me.

    I need via a GET to retrieve all the events fulfilling 3 variables/conditions which refer to 3 inputs:

    • the user who owns these events
    • a date in text format which must be equal between the input and the value
    • a duration which must be < the input.

    The most efficient method is to use the fuzzy search or a classical search that fulfills these 3 conditions?