Experiencing extreme slowliness in self hpsted retool

Recently I've been experiencing extreme slowness in my retool web app.
when i inspect data on my server(when i run the dockerized retool) i see that there are constant disk swaps and it consumes most of the CPU.

Some stats about my web application:
i make multiple GET requests every 5-7 seconds to my back end service for, because i need to see updated data and display it to the user.
Also, on refresh i fetch from aws and git resources and the data is quite large.

I try to apply some optimizations to the app and allow query caching and disabling when required conditions arn't met.
I would love for any advice of input.

Hi @Daniella_Aharon! Welcome to the community forum. :slight_smile:

How much memory and how many CPUs do you have allocated to the instance? You can run docker info to get a detailed printout.

From an app-building perspective, the primary recommendation I have for optimizing performance is to use some of the built-in debugging tools. The "Timeline" and "Performance" tabs can be especially helpful.

You can see which queries take the longest, as well as which queries return the most data. Once you identify the least performant queries, you can implement caching (like you mentioned) or server-side pagination.

Depending on how your app is structured, it might also help to convert it to a multipage app. This helps isolate related views and queries so that not as much information is displayed on the page at a given point in time.

I hope this helps! Let us know if it makes a difference or if you have any follow-up questions.