- I have a custom component library with many deployed versions. Does the app loading speed will increase when I deployed new library version using
retool-ccl
? - When I create a component library for different applications, should I put all components into a single library or create multiple libraries? Which option is preferable in terms of performance?
Hey @MChuduk! Thanks for reaching out and for your patience.
I encourage you to check out the "Network" tab in your browser's dev tools when loading up an app that includes custom components, as it's pretty enlightening.
You can see that there are a few different requests fired off:
customComponentCollections
: returns information about all libraries defined in the orgcomponents.css
: returns the CSS for a single custom component rendered on the canvascomponents.js
: returns the JS for a single custom component rendered on the canvasretool-custom-component-manifest.json
: returns a brief description of every component defined in a single library
Generally speaking, the number of deployed versions shouldn't have any performance impact and it might be slightly preferable to pool your components into a single library. Up to a point, at least.
I hope that helps! Let me know if you have any follow-up questions.
Okay, all of that makes sense. But I also noticed that my application loads faster when I switch to the deployed version of the custom components library instead of using it in development mode. Does that make sense?
That's to be expected, at least to some extent! In dev
mode, the IDE is continuously "listening" for new library revisions in order to update components in real time. Deployed versions are essentially static releases.
Got it. In your opinion, is it better to build the entire page as a single custom component, or to use separate custom components and place them onto the canvas inside Retool?
I'd probably tend towards building a single component that encapsulates all the functionality that you want to implement, unless you need to break it up across multiple apps or make certain pieces of it more modular.