Dash long startup time for lots of callbacks

I am developing a multipage Dash app, and as the app’s functionality grows and more callbacks are used, its performance slows down, especially during start-up. It can take up to 10 seconds until the app’s layout is loaded and the app is ready to use. During this time, the “Loading…” message is displayed in the top left corner of the screen.

Is there a workaround to display a spinner during app start-up or perform lazy loading of callbacks (or Python modules) in Dash?

HI @Vah ,

concerning the spinner:

I used the CSS variant from here in the past:

1 Like

Thank you for your response. The first solution did not work for me, but I implemented the second solution and it worked. Thank you.