Streamlit slows down with many nested blocks #9456
Labels
area:performance
area:ux/ui
priority:P2
status:confirmed
Bug has been confirmed by the Streamlit team
type:bug
Something isn't working
Checklist
Summary
In this forum discussion, we investigated an issue where a user app became slower after release 1.35.
It looks like the CSS styling introduced in this PR 5 is problematic and started to make rendering bigger apps using many blocks way slower.
Reproducible Code Example
No response
Steps To Reproduce
The issue can be reproduced by running the user's app from this repo: https://github.com/diogovalentte/mantium/tree/main
via Docker locally. The user has provided a database than can be copied to the postgres container in order to populate the app with enough data. I assume you could reproduce it with a simpler Streamlit app, but I haven't found the time yet.
However, when running the app with Streamlit 1.34 and with 1.38 you can notice a significant scroll speed difference even up to a point in which the app freezes. If you comment out the CSS selector from the linked lines of code above, the issue seems to be fixed.
Here are a few example commands (update the paths) where you can easily make the changes locally on your Mac and copy them into the container to test changes:
Expected Behavior
Scrolling through the app should not make the browser window freeze and/or be super slow.
Current Behavior
No response
Is this a regression?
Debug info
Additional Information
No response
The text was updated successfully, but these errors were encountered: