Hi all,
For multipage builders, here are some factors to consider when thinking about how to organize functionality into pages within a multipage app, and/or across multiple apps:
Performance
- Performance of Retool apps is primarily impacted by the number of code blocks and components on all pages, rather than just the total number of pages.
- In multipage apps, computation for other pages is deferred until those pages are focused.
- A multipage app with a large total number of code blocks and components, spread across many pages, may become slow on initial load, although it'll be significantly faster than a single page app with the same number of code blocks/components.
- The performance of interactions on a given page, or switching between pages, will be dominated by the number of code blocks and components on those pages, and not by the total number of pages/code blocks/components in the app.
Developer experience
- Although we're working on editor improvements to make finding code and components easier, an app with hundreds of pages can be difficult to understand and edit.
- In multipage apps, pages and their contents are split into separate Toolscript files to help with readability.
Using separate apps
- Navigating between pages in a multipage app is faster than navigating between separate apps
- The mechanisms for sharing code and components in multipage apps (global code, frames) are lower friction, easier to set up, and less powerful than the mechanisms for sharing code across apps (modules, query library).
- Heavy use of modules may impact performance in both single and multipage apps.
- Large and complex apps (single page or multipage) with thousands of plugins and hundreds of pages may perform poorly - to solve, you can split functionality into separate apps.
- A large and complex page within a multipage app won't enjoy much of a performance boost compared to an equivalent single page app - multipage's performance benefits come from delaying computation for other pages until they're focused.
- When using source control, developers collaborating on separate pages of a multipage app will experience more frequent merge conflicts than they would when working on separate apps.
Finally, please be aware that these aren't set in stone - keep an eye out for updates as we continue to work on making Retool faster and easier.
Happy building!