optimizing-streamlit-performance

Community

Boost 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_data and @st.cache_resource to memoize function calls and prevent redundant computations or resource loading.
  • Fragments: Utilize @st.fragment to isolate UI components, ensuring only specific parts of the app rerun on interaction.
  • Forms: Batch user interactions using st.form to 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_control or st.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 required

Components

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.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.