Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible memory leak when using option_menu with st.progress #51

Open
FlandiaYingman opened this issue Sep 19, 2023 · 0 comments
Open

Comments

@FlandiaYingman
Copy link

The minimum working code snippet:

import time

import streamlit as st
from streamlit_option_menu import option_menu

with st.sidebar:
    option = option_menu("Menu Title", ["Option 1"])

progress = st.progress(0)
while True:
    progress.progress(0)
    time.sleep(0.001)

Run it, and press Shift+Esc to see the memory consumption. You will see the memory that the tab consumes grows rapidly.

If I comment out the option_menu line (replace it with pass), the memory consumption will not grow anymore.

streamlit 1.26.0
streamlit-option-menu 0.3.6
Microsoft Edge 117.0.2045.31
Windows 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant