Application slow to load

Hi,

We've been building a new app with a significant increase in functionality compared to other apps we've been building, including with copious use of modules. (though level of functionality is negligible compared to other react app I've worked on).

Once loaded, the app works great, and responsiveness is fine.

However it is taking a long time to load:

Performance Log: Time to first query: 10554ms
Performance Log: Time to productivity: 3115 ms (this is less than our other apps despite increased functionality)

This issue is exacerbated for the user by the lack of feedback while the app is loading - they just see a white screen and even the spinner seems to have disappeared.

Noting that due to the app size it may be difficult to optimize loading without stripping out functionality. But wondering if there's anything else we can do? Or is it something you guys are working on?

Also, is there any way we can get a loading gif on that screen, or a message that it may take a while.

Cheers,
Ben

image

I would suggest you split the app into multiple pages and connect with a navigation component. There is also a private beta for multi-page app Recap: Retool’s Q2 Developer Day | Retool Blog | Cache (see also the waitlist and docs), which I am using and finding very helpful.

Hi @jg80,

Thanks for your response.

For context our app initially presents the user with a list of carbon projects and the user can click through to a detail view where they can manage various lists of related records across multiple tabs (all built as separate retool modules).

So I guess this would be a pretty good candidate for a multipage view, one page for the main project list, and another page each tab of related information.

It the beta for multi-page available for on-prem retool instances?

If not do we know when it will be available?

Thanks again,
Ben

Good question multipage app is on self host or not?

1 Like

I'll just add for what it's worth, that the app wasn't loading noticeably slowly until about a week ago (and the same point the loading spinner disappeared).

I'm not quite sure what changed - we didn't upgrade our on prem during that time.

1 Like

Confirmed beta is available on self host

2 Likes

How do you activate it

@agaitan026 This is the link to join the Beta

https://retoolin.tryretool.com/form/1956dc1c-f507-4a04-aaf2-a22461e93324?__hstc=88772100.394eabb72277d2ac0329a243bcd97932.1712329089161.1722456175608.1722485645556.162&__hssc=88772100.3.1722485645556&__hsfp=2112289063

1 Like

Thanks

1 Like

Hey @BenCook, I'm an engineer working on Multipage. I'm curious if you got to migrate your apps to Multipage and how it went?

Hi @ming , thanks for checking in!

I got this switched on yesterday and spent a few hours rebuilding our app - as we'd used a lot of modules it was basically taking apart a jigsaw puzzle and putting it back together.

Time to first query has been reduced from 10s to 5s without reducing functionality, so that's really good.

Feedback - you guys have done an amazing job on this (as I've come to expect with everything retool :slight_smile:)

It was easy to rebuild the application, the ui is intuitive, wiring up url params.hash made it easy to pass information across pages.

Probably one thing I'd ask for is a state property of the current page (I got around this with a transformer pointing at the url).

Also would be nice to have some sort of loading spinner when the app is loading (currently getting whitescreen), and as each individual page loads.

Cheers,
Ben

ps. We're still not sure why the load times across all our apps suddenly increased last week. We didn't do a retool update or make significant changes, but loading time seems to have doubled (and the loading spinner has disappeared).

5 Likes

Awesome to hear that multipage has gone well! I forwarded your thread to the performance team who will investigate why the performance suddenly dropped.

Probably one thing I'd ask for is a state property of the current page (I got around this with a transformer pointing at the url).

We've gotten a couple requests for this and will prioritize it over the next few weeks!

Also would be nice to have some sort of loading spinner when the app is loading (currently getting whitescreen), and as each individual page loads.

This is a good suggestion as well! We'll work internally to figure out what this could look like.

1 Like

Great thanks @ming!

I'm curious to know if anyone else has experienced a recent slow down of app loading times - hopefully the performance team can get to the bottom of it.

@ming I am having one issue that I haven't experienced before, so I presume to do with the multipage.

I've been building my project in our dev environment (on-prem), and when I merge and run in prod everything is fine.

But when running in UAT I get this on app load:
image

None of these are new modules, and they all exist and work fine in the old app in uat.

When I identify and remove one of these modules it then gets replaced by something else in the list.

Hoping it's something that can be fixed?

Interesting, what is UAT? Are you trying to run your app with Retool Embed?

Hi @ming,

No we aren't using retool embed

We run retool on-prem with 3 instances all pointing to the same github repo:

*Dev
*UAT (or User Acceptance Testing)
*Prod

As soon as we protect a module it's available in all 3 instance, and we don't have any problems using it in an app.

When I build the multi-page app in dev and merge to the master branch, the application runs fine in the prod instance.
However when I try to run it on the uat instance it gives the above message that it can't find the modules and the app won't load.

Hey @BenCook,

Got it, couple more questions:

  • Does the module have nested modules within it?
  • Are there permissions related to each module?
  • Could you check your browser's network tab while the app is loading and see what the lookupPageByUuid call responses are?
  • Just to double check, this was working on your single page app but not your multipage one?

Best,
Ming

Hi @ming thanks for your support!

  • Does the module have nested modules within it?
    Yes several modules have nested modules.

  • Are there permissions related to each module?
    We have the modules in a specific folders, and all users have 'use' access to these folders. (I think this is what you mean)
    image

  • Could you check your browser's network tab while the app is loading and see what the lookupPageByUuid call responses are?
    This is Uat

Prod (only the initial request:

  • Just to double check, this was working on your single page app but not your multipage one?
    Yes correct, all the same modules are fine in original single page app, and it is just the multi-page failing in our UAT instance. I tried creating a new multi page but hit the same issues. Aside from this it's performing way better than the original app.

Thanks again!

2 Likes

Hi @ming, I've done some additional investigation to get some more information for you guys:

So loading in our uat instance got a series of these messages:

image

To determine which module it is I appended to a url:

image

And got this:

image

Then I looked up this module in the lookupPage response in our different instances - found in linkedPagePaths.

Dev:
image

Uat: not found

Prod:
image

Hopefully this tirggers something?

Cheers,
Ben

1 Like

Hey Ben!

Always happy to help, we want to make sure multipage apps meets parity with single page app so I'm grateful for your patience.

To follow-up on your second comment, where are you finding linkedPagePaths?

Part of me thinks there is some weird permission-ing edge case going on with your UAT instance + Multipage. I'll keep looking