Defer module evaluation
App builders can now defer the initialization of modules until they're viewable to improve the initial loading time of larger apps.
To enable this public beta, navigate to Beta > Settings and enable [Perf] Module deferred evaluation.
When an app is initially loaded, Retool initializes all code, components, and modules. However, a common use case for modules is including them in conditionally hidden frames, and these modules don't need to be loaded when they are still hidden.
Modules now have a new option in the Inspector: [Beta] Defer evaluation until visible. When a “deferred” module is hidden (either ‘hidden’ state is true, or it is in a hidden frame, or otherwise not being rendered), Retool defers the module's initialization. When the module is shown, Retool invokes the initialization procedure that would typically happen during app startup.
This gives builders more flexibility in how components are loaded in their apps, and large apps load more quickly.