optimizing-streamlit-performance
Installation
SKILL.md
Streamlit performance
Performance is the biggest win. Without caching and fragments, your app reruns everything on every interaction.
Caching
@st.cache_data for data
Use for any function that loads or computes data.
# BAD: Recomputes on every rerun
def load_data(path):
return pd.read_csv(path)