randyzwitch / streamlit-folium

Streamlit Component for rendering Folium maps
https://folium.streamlit.app/
MIT License
468 stars 176 forks source link

Use render() in main only once #144

Closed BastienGauthier closed 1 year ago

BastienGauthier commented 1 year ago

This PR fixes https://github.com/randyzwitch/streamlit-folium/issues/143 -> fig.render is removed in _get_map_string and _get_siblings to avoid redundancy.

Note : performance gain to have the map depicted on my use case (with st.profiler) : from 40sec to 25sec. (almost 40%)