A problem has arisen with the running speed

Hello Backendless team,

I am creating a web app in Backendless to audit a invoice file.
for auditing I need to check thousands of data with different logics. It’s take so much time to check every data. how can I speed up my logics. I providing a images of my current logics.





Hi @Paras_Satodiya

Welcome to the community and thanks for trying Backendless out!

Private messages are available only for Pro and Manage customers.
The only exception is when a regular customer needs to share sensitive data like emails/passwords/etc.
So, please let me know if it’s possible to make the topic public to assist you with the issue.

Regards,
Vlad

Hello @vladimir-upirov

Thank you for the response!

It’s okay for me to public this topic.
So, can you please assist me how to public this topic.

I can recommend you add “Print” blocks before/after API requests and blocks groups to see what exactly takes time

I’ve already tried this, but I’m encountering an issue with my workflow. I’m relatively new to Backendless, so my knowledge is limited.

I have a large amount of data in my invoice table. At any given time, I retrieve 100 objects from the table and store them in a list. Subsequently, I iterate through this list, checking each piece of data against various parameters. Once the data is checked, I create a new list and upload it to a different table using bulk create. I repeat this process iteratively.

Is there a way to quickly validate all the data?

Hello @Paras_Satodiya,

The biggest problem is that сurrent logic makes additional requests to the API, which increases the execution time. The only thing we can advice here is to analyze your logic and optimize it.

Hello @olhadanylova ,

Thank you for your prompt response!

Yes, I understand that my current logic may not be ideal, but it’s necessary for me to make additional API requests. I’ve carefully analyzed my logic and optimized it to the best of my ability, but it still doesn’t seem to be performing optimally.

Do you have any plans or suggestions to enhance the speed of this process?

Hello @Paras_Satodiya,

when you make a lot of requests in loops inside loops, it’s hardly can be optimized (unless you don’t have duplicated requests).
You can move your logic to the Cloud code (backend), it may speed up a little, but not very much.

1 Like

Hello @stanislaw.grin,

Yes, I do utilize a significant number of requests within nested loops, but it’s an essential part of the process!

I’ve explored using Cloud code, but unfortunately, Cloud code has a time limit.

This reminds me of the times when a child would say “my stomach hurts because I ate too much”. :slight_smile: Is the problem with the stomach or the volume of food? Clearly the latter.

Running speed in your case is the direct result of the complexity of your logic. I believe this is outside of the realm of our support coverage. You need to think about other ways to simplify and optimize your logic.

Hello @mark-piller ,

I understand! :man_running::sweat_smile: It’s like ordering a whole pizza and blaming the slow delivery guy, right?

Time to slice up that logic and speed things up! Thanks for the food for thought! :pizza::rocket: