optimizing-streamlit-performance
CommunityBoost Streamlit app speed and efficiency.
AuthorAaron-Tawil
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill addresses slow-loading and inefficient Streamlit applications by providing strategies to optimize performance, reduce unnecessary reruns, and manage resource usage effectively.
Core Features & Use Cases
- Caching: Implement
@st.cache_dataand@st.cache_resourceto memoize function calls and prevent redundant computations or resource loading. - Fragments: Utilize
@st.fragmentto isolate UI components, ensuring only specific parts of the app rerun on interaction. - Forms: Batch user interactions using
st.formto trigger a single rerun upon submission, ideal for multiple inputs. - Conditional Rendering: Optimize loading by rendering heavy content only when necessary, using elements like
st.segmented_controlorst.toggle. - Use Case: You have a Streamlit dashboard that displays real-time metrics and allows users to filter large datasets. By applying caching to data loading and fragments to the metrics display, you can significantly speed up initial load times and ensure that only the filtered data section reruns when a user changes a filter.
Quick Start
Apply the optimizing-streamlit-performance skill to cache the load_data function using @st.cache_data.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: optimizing-streamlit-performance Download link: https://github.com/Aaron-Tawil/super-order-automation/archive/main.zip#optimizing-streamlit-performance Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.