Make DashGlobe snappier for large datasets - #1
Merged
Conversation
Split the physical async bundle into cached Three/H3/vendor chunks so async-DashGlobe.js drops from ~1.8MB to ~35KB, stop shipping source maps in the Python package, and add data_url() plus enable_large_data_mode() so large GeoJSON loads in the browser with compact event payloads. Co-authored-by: Jeff <jeffgallini@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses the oversized physical DashGlobe chunk and makes large-dataset showcases practical in Dash.
Bundle / package size
async-DashGlobe.js~35 KB (was ~1.8 MB)async-three.js,async-h3.js,async-globe-vendor.js.js.mapfiles in the Python package (MANIFEST.in/setup.py/_js_dist)Large-data runtime
dash_globe.data_url(...)marker so layer GeoJSON/JSON is fetched in the browser instead of embedded in the Dash layoutenable_large_data_mode()/largeDataMode+ defaulteventDataMode="summary"so hover/click payloads omit geometriesMeasured impact
data_url(~99.7% smaller)Files touched
dash_globe/webpack.config.jsdash_globe/src/lib/fragments/DashGlobe.react.jsdash_globe/src/lib/fragments/largeData.jsdash_globe/src/lib/components/DashGlobe.react.jsdash_globe/dash_globe/data.pydash_globe/dash_globe/globe.pydash_globe/dash_globe/__init__.pydash_globe/usage.pyTest plan
test_large_data.py,test_globe.py,test_usage.py(34 passed)async-three/async-h3/async-globe-vendor)data_urlshowcase path