App (Editor and View) being Extremely Slow or No Response

Hi community!

Since few days ago, my retool App has been extremely slow, or even worse, does not work at all (complete blank page with no components loaded). There's approximately 19 queries (postgreSQL), which are shown as a paginated table.

I have no idea what caused this issue, but it would be extremely helpful if I can get any advise.

Many thanks.

1 Like

Hi @nick-sh-oh, welcome to the community :hugs:

How much data are those ~20 queries loading? Do you have any transformers coupled to that data?

@nick-sh-oh , do you see any errors in your debug window? Are all the required queries executed?

Hi @nick-sh-oh It would also be helpful to hear if you're on Retool Cloud or self hosted? If self hosted, which version #?

Hi @minijohn! Thanks!!

On average each query loaded 50k-70k rows of data, so in total, approx 1m rows. I somewhat sorted this problem by dividing the queries, and seperating them in two different dahsboard. But it seems that retool app is not handling table paginatinon well. (There are no transformers coupled to the data)

Hi @mbruijnpff!

No there are no errors in my debug window, and all the required queries are well executed. I think the main problem comes from the size of the data (for example, the browser frequently crashes with "Out of Memory"). And that was the main reason why I tried using table pagination, but using table pagination basically raised the issue that I originally posted

Did you use serverside pagination? That should keep the fetched dataset small.

1 Like

Dang, that's 1 - 1.5mil rows loaded into memory @nick-sh-oh :stuck_out_tongue:

I'm going to assume that you don't really need the entirety of the data loaded at runtime so you could start by filtering on:

  • Date
  • Table size (server side pagination, with offset and limit on psql)
  • Other characteristics (association filters etc)

If you're using the app as an analytics end-point, in which case you would need the entire data set to draw insights from -> I would use a "counter-cache" approach, create a workflow that does the heavy lifting and save the aggregations in Retool DB. You can refresh the data every X amount of time and don't need to have the app fetch all of that data.

Does that work in your case? If not, can you explain why you need that data at run-time? I'm sure we'll find a way :))