Streamlit Dashboard - performance

running a specific code\logic in a dashboard has slowed down the entire dashboard , if i remove the specific code , it works . can anyone help if there is a way to handle this ?

One more thing , i created a dashboard , which works fine with having multiple graphs , dataframes , indicators etc . but if i press one object , the entire dashboard loads again , which slows down the things .what i am trying to suggest is that , if i open a graph by pressing a button on dashboard , if i select other button , the first output gets removed and it resets the old opened objects , which is not a good way in dashboards .can anyone has some suggestions\tips regarding this ?

Hey @Pavan_Deep,

First, Welcome to the Streamlit Community! :tada: :partying_face: :star2: :partying_face: :tada:

Second, have you had a chance to check out the @st.cache method and docs?

The purpose of the @st.cache method is to decorate it around functions that are slower or computationally heavy, that way Streamlit remembers the output of the function(s) so the user doesn’t have to wait multiple times for the same output.

If you have tried using it, check out our tips on improving your app’s performance using it!

Happy Streamlit-ing!