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