Safe to use -O / -OO parameter for running in production to improve performance?

Hi, usually when running Python scripts in production I pass the -Oor -OO flag to remove asserts etc. As Streamlit does not provide this flag, I tried this workaround:

streamlit run app.py
# becomes
python -O -m streamlit run app.py

Are there any drawbacks?

3 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.