Embedded app taking too long to load

  • Goal: We embedded two retool apps into our current frontend infrastructure however we have seen that the first load could take more than 5 seconds which could result in a bad user experience. Is this an expected behavior? Given the case that we have more than 10 queries in both apps.

  • Steps: In the meantime I've been trying to improve the performance by disabling some queries that are not being in use, and caching the ones with static information. But still the results are not the ideal

  • Details:
    image
    I have seen that some of the slowest queries in retool performance tab, takes more than a second in retool, however in postman they take less than a second.

image

For example this query takes less than a half of the time that it takes in retool

image

Thank you in advance :slight_smile:

Hey @amilcarSanchez,

The first load could take more than 5 seconds which could result in a bad user experience. Is this an expected behavior?

First load time is dependent on many factors:

  • The size of your retool app, how many components are rendered on load
  • The number of queries, how long they take, how expensive it is to process a response
  • Your CPU, and network connection

From your screenshot, I'm guessing your app is relatively complex, so 5s is not unreasonable given a query time of 2.5s.

I have seen that some of the slowest queries in retool performance tab, takes more than a second in retool, however in postman they take less than a second.

This is a common issue I've seen people bring up. The discrepancy you're seeing is that Retool includes any time the browser spends waiting to process a response in that query number. Postman does not include that time. You can see a further breakdown of query time in edit mode, if you mouse over the query time:

Hope this helps!

One more thing, I saw someone share this good blog post with a bunch of performance tips, worth a read: