I have a fairly complex dashboard with nine pages. Each page has a collection of charts and tables. For example, page (1) has seven line charts (px.line), three bar charts (px.bar), four grouped bar charts (px.bar) and seven tables (dataTable). Page (2) has up to thirteen tables and six stacked bar charts (px.bar). The other pages are all somewhere in between.
Selections are made through a series of dropdowns. Data is stored in SQLite. I am using plotly 5.6.0 and dash 2.10.2. And the app is running locally.
My observation is that each time someone logs into the app for the first time, the very first fig, regardless of page, takes between 3-5 sections to load (timed with the ‘time’ import).
So if I start the app and open Page (1) (the one with 14 figs), the first of the seven line charts takes 3.5 seconds to load. All of the other 13 figs take between .04 and .08 seconds to load.
When I start the app and open Page (2) (the one with 6 stacked bar charts), the first stacked bar chart takes 3.4 seconds to load. The other 5 stacked bar charts take a combined .3 seconds to load.
Once that first page is loaded, while faster, the loading times still feel slow. Changing a dropdown on Page (1) still takes between 2.5 - 3 seconds and Page (2) takes around 1 - 2 seconds.
It isn’t loading or processing the data either. Even at it’s slowest, the data doesn’t take more than .3s to load and process. The dataTables are also very fast.
Is this par for the course? Does dash/plotly perform some sort of long initialization whenever the first figure is loaded in an app? And are my ‘post-load’ rendering times typical? If this all isn’t working as intended, i’d be happy to post some code to see what might be causing this.