Trying to preserve memory while using wizards

I'm working with a wizard for the first time, and I'm afraid my app is going to get bloated as I go through the steps.

I'm wondering:

  • Will I save memory by specifically disabling components like tables that draw off of large data sources (~1,000 - 5,000 records) as I finish with them and go on to future steps?

  • If so, and it is useful to disable unnecessary components, do the steps of the wizard do that, or should I do my own component disabling between steps?

  • Will I save memory in any meaningful way by clearing the results of resource queries and/or javascript queries (those being arrays of 1k-10k records with 10-20 keys each)? Or is this small potatoes compared to all my components? (I know that generally large record sets aren't a problem for browser storage, but I'm not sure if the size balloons with retool's metadata)

  • As a hybrid option, would it make sense to clear the data populating large components (like tables) so those components re-render empty?



Hey there :wave: I am going to link you our docs on Building performant Retool apps. You would definitely save memory by clearing the data returned by the queries, but that would be an issue if you ever need that data again. Besides what the linked doc I shared states, another recommendation would be for really complex apps you would want to break them up and use deep linking / navigation to move between the apps and transfer information.

Thanks Lauren! I've found that page really helpful in the past.

I was having trouble finding the answers in particular to two of my original questions about how retool's working under the hood. Maybe I can restate helpfully to try to make them make sense:

1.) Does disabling a component save any amount of memory?

2.) Should I consider all the components in each of the steps of the wizard to be taking up memory at once, or am I only using memory for the components displayed in a specific step?

cheers, Mark


Hey there :wave: Sorry it wasn't clear -- disabling does not remove the components, so the data in each component will still take up the same amount of memory. If you see it in the left panel then it is there, hope that clears things up!

1 Like

Got it, thanks a ton!