I have a multi page app that I am finding has a slow initial page load speed.
My question - when the app is first visited, do all the callbacks from all the pages trigger, or is it just the callbacks from the currently active page that triggers? If they all trigger, is there a way to disable this?
There are 10 pages, all of which are pulling data from an AWS RDS db, and uploading it to a datatable component and a chart.
In my experience it is only the active pages that are loaded. You could easily check this yourself with a print statement when the callback is triggered.
My layouts are currently functions in other modules, that I am importing into the module with the callbacks.
When the update arrives, will the update make using layout as a function the same speed as using app.layout directly, or will there still be a difference between the two of them?
Hi @AnnMarieW I’m wondering if the functional layouts was fixed? Couldn’t see anything in the changelog. I am seeing 2 seconds minimum for a layout function to run even with just one html.Div() and suppress_callback_exceptions=True. Running layout functions without dash_pages happens in millisecs. Can do a MRE if needed.
My question is regarding how the callbacks function when the app is first visited. Specifically, do all the callbacks from all pages trigger immediately, or is it just the callbacks from the currently active page that execute? I suspect that if all callbacks are firing upon the initial visit, it could be contributing to the slow load time.