forked from streamlit/streamlit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache JSON when using pydeck local data (streamlit#7113)
<!--⚠️ BEFORE CONTRIBUTING PLEASE READ OUR CONTRIBUTING GUIDELINES! https://github.com/streamlit/streamlit/wiki/Contributing --> ## Describe your changes - add a protobuf key named element id which is a hash of the pydeck json - add logic to not parse the json again where the json is stored in state - if the hash string is different, then parse it again - if it’s not, use the cached json - add fullScreen and theme to state - if these change, we need to parse the json again to rerender the new map - these changes make the loading slightly longer when rerunning or running the script; however, the experience is significantly better so it's worth to do this. ## GitHub Issue Link (if applicable) streamlit#5532 ## Testing Plan - Explanation of why no additional tests are needed - Unit Tests (JS and/or Python) - will need to add these - E2E Tests - very difficult to add these so will not be adding these. - Any manual testing needed? - yes, i manually tested the test case within the issue 5532. I will grab other use cases from pydeck and make sure they're responsive. This branch: https://github.com/streamlit/streamlit/assets/16749069/130d21ca-efe4-437b-aa6e-fb1a04c6805b Develop: https://github.com/streamlit/streamlit/assets/16749069/275b4e00-4f1d-444e-bf69-f84040c9b86f --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
- Loading branch information
1 parent
da884c6
commit b12f855
Showing
5 changed files
with
191 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.