Slow app

I created an app with streamlit but it is relatively slow (it takes 5-10 seconds to upgrade a page).
I have created different tab with st.tabs and my app is mainly using pandas and poorly graph
My question is how to have something more rapid ? Did the st.tabs structure imply that the app runs all the program each time ? Will it be better to use multiple pages (because it does not run all the program) ?

Thx for your help

1 Like

Hi @Jacques2101

Yes, using multiple pages instead of tabs in your Streamlit app improves performance by avoiding repeated computations, data loading, and rendering that occur with tabs. Each page focuses on a specific task, executing only necessary computations and data loading when accessed.

Leveraging Streamlit’s st.cache decorator can also enhances app performance by caching computationally intensive operations. More info about st.cache here.

I hope this helps,