Streamlit app runs super slow

Hi everyone,

I’m running a local Streamlit app which isn’t not deployed yet. I am developing a data visualization interface. In the app, I created a drop-down menu where each option connects to a plotting function. The options are A, B, C, D, and “Complete Evaluation.” “Complete Evaluation” plots all the graphs (A, B, C, and D). Additionally, I have a function to count the time taken to plot the graphs.


However, the app sometimes crashes when selecting “Complete Evaluation,” or I have to wait more than 10 minutes for the plots to appear, even though the time function shows that plotting takes around 20 seconds in total.

I’ve tried adding @st.cache_data to each function but the problem still exists, and I notice that every time I use Streamlit app, my CPU and memory are quite high.

I really have no clue about how to improve this issue. Any specific suggestions will be appreciated.

ps: The A, B, C, Din the content are ‘Flow-rate’, ‘Pressure’, ‘Level’, etc. in the code.

Thanks again for your time and patience to finish reading this article!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.