Optimise - or find things that slow the App down

First off. I love working with Tadabase. Its allowing me to create our vision of the applications we need for our business much more quickly than we could if I had to explain and specify in a traditional development. And, by doing the thinking and developing at the same time, we are constantly seeing new ideas that we can use.

But, as an untrained developer I have a fear. Am I building a monolith that is doomed to fail when put to the test? Is the design of tables and connections too complex to ever deliver acceptable performance. I know that our overall usage is absolutly trivial in the big scheme of things. We will never have millions of records of anything!

But, even so, I can already see visible lag when creating some new records, and sometimes the builder takes an age to load. What I donā€™t know is whether these delays are due to Amazon loads or the server locations, or whether its a more fundamental issue.

So I wonder ā€¦ is there a tool or method to diagnose how my App is performing, and what (if anything) is holding it back?

In MySQL there are basic features that tells you how many database calls a page has made, how long it tookā€¦ is there something similar that can be done for my Tadabase App?

@mtif-

I am in the same boat as you. I have also been able to start creating a treasure trove of different applications for the industry that I am in. In my experience working with the platform for over 2 1/2 years now I would say the only pieces that would add significant load and potentially slow down responsiveness is the use of custom JavaScript. While some JavaScript is OK if you have a large number of Scripps it has the potential of slowing down your application. Other than that I have not found anything that I have custom created that would slow down the process unless you are trying to create PDFs in the current PDF component.

Thanks for that SafetyUniversity. I have used a few custom Javascripts, but not many.
And maybe the delays I am seeing are because I am in Europe, and the servers are not.

I am hoping that there might be, or could be, a ā€˜debugā€™ mode that shows the queries and processing required to render specific pages.

@mtif, these are very good questions and something a bit complex to answer.

Over the last few months, weā€™ve been getting many questions along these lines and Iā€™ve been working on an article to give insight into infrastructure and how to test, optimize and properly scale.

In short, there are many factors that play into the speed of your app. The top 3 are:

  • Equations and formulas
  • Complex logic
  • Custom code

In my upcoming post I will dive deep into each item and explain everything you need to know.

On the support team, we do have a ā€˜debugā€™ mode, I love the idea of enabling this on the client-side as well. Weā€™ll certainly look into that.

Iā€™ll update a link to the post in the coming days.

2 Likes

Thanks Moe,

Looking forward to that post.

Hey @moe did you get an opportunity to document the above, itā€™s exactly what I need too. I need to optimise my app. A better understanding of best practice would be great, doā€™s and dontā€™s for performance. Alternative approaches to formulas perhaps in certain circumstancesā€¦ Iā€™d love to see this kind of thing covered in a video by yourself or @tim.young .

1 Like

Hi,

I would be glad to see such a video too.

Alex

Hi everyone,

Picking up on this thread, I wonder to what extent table rules also have an impact on app speed. If an object in my app has, say, 40 table rules applied to it is this likely to slow the app down considerable when records are added or edited? And how does this impact compare with the effect equations?

Grateful for any experiences/insights. Iā€™m working hard to get our app to do some complex pricing calculations for us and donā€™t want to forge ahead blindly if the method Iā€™m planning on using is going to result in something clunky.

Cheers,

Peter

@peterclayburn

Great question! We do have the ability to check this specifically using some debugging logs. When records are submitted via Form Component, weā€™re able to see exactly which processes took place behind the scenes, and how long they took to execute. If youā€™d like to run some tests, please let me know through support chat or by emailing support@tadabase.io

Additionally, Iā€™ll enable equation logs for you so that you can ultimately compare the execution time of table rules to your equation fields.

@tim.young

Awesome ā€“ thanks for enabling equation logs. Will be in touch via support.

Moe,
+1 as I would really like to see this post. The only part of Tadabase where I still struggle to provide the desired user outcome is with response time. I have tables with lots of formulas (20+) and a I use a lot of roll-ups (because my tables often ā€œnestā€ 3-4 levels deep and the roll-ups can only go down 2 levels so Iā€™ve had to resort to ā€œroll-ups into roll-upsā€, which works, but which is very slow.)

One result is that when I click an ā€œAction Linkā€ to update a record, it seems like it needs to recalc all the fields and roll-ups (in the table and I suppose in ā€œdependentā€ tables above and below) which can lead to 15-30 seconds of delay from the click to the response. This is somewhat solved by the ā€œdo calculations in the backgroundā€ function, with two limitations I have found:

  1. This does not seem to reliably fire all the calculations for all the formulas in tables ā€œabove and belowā€ the table being updated (although all the calcs are done with ā€œbackground calcsā€ = onā€¦ itā€™s just super slow)

  2. When I have an action link that updates a record, there does not appear to be any way to use the ā€œbackground calcsā€ function. Use case - picture a big green ā€œApproveā€ button on a record - the user clicks this to approve the record but then has to wait 15-20 seconds before proceeding. Would be ideal to turn on background calcs (maybe at the table level?) so that after clicking ā€œApproveā€ they can immediately proceed and the calcs are done in the background.

I would really like to understand more of how Tadabase is running these calcs and when so that I can figure out how to optimize my apps.

FWIW, none of the calculations are complicated math (many are just Field C = Field A + Field B), and all the calcs would be essentially instantaneous in Excel on my laptopā€¦ so just not sure what itā€™s so slow on Tadabase? There shouldnā€™t be any real computational lift - I guess itā€™s just that my app is sharing CPU with so many others?

Thanks for all the help with this. Otherwise a great tool we continue to build great solutions on.

-Dan