Overview

Streamlit 1.40, released on January 15, 2025, improves rendering performance and cache management.

Main Features

Faster rendering

The rendering engine has been optimized to reduce unnecessary re-renders. Components are only updated when their data changes.

python
import streamlit as st
import pandas as pd

st.title('Dashboard')

@st.cache_data
def load_data():
    return pd.DataFrame({'x': range(100), 'y': range(100)})

df = load_data()
st.line_chart(df)

Improved cache

The @st.cache_data and @st.cache_resource decorators are more performant with better memory management.

python
import streamlit as st

@st.cache_resource
def load_model():
    # Loaded once, shared across sessions
    return {'model': 'ready'}

model = load_model()
st.write(f'Model: {model}')

Sources