Skip to content

Make DashGlobe snappier for large datasets - #1

Merged
jeffgallini merged 2 commits into
masterfrom
cursor/snappy-large-data-globe-4e31
Sep 2, 2026
Merged

Make DashGlobe snappier for large datasets#1
jeffgallini merged 2 commits into
masterfrom
cursor/snappy-large-data-globe-4e31

Conversation

@jeffgallini

@jeffgallini jeffgallini commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

Addresses the oversized physical DashGlobe chunk and makes large-dataset showcases practical in Dash.

Bundle / package size

  • Split the async physical bundle into separately cached chunks:
    • async-DashGlobe.js ~35 KB (was ~1.8 MB)
    • async-three.js, async-h3.js, async-globe-vendor.js
  • Stop shipping .js.map files in the Python package (MANIFEST.in / setup.py / _js_dist)

Large-data runtime

  • New dash_globe.data_url(...) marker so layer GeoJSON/JSON is fetched in the browser instead of embedded in the Dash layout
  • New enable_large_data_mode() / largeDataMode + default eventDataMode="summary" so hover/click payloads omit geometries
  • Stable layer fingerprints + URL resolution in the React fragment to avoid unnecessary globe rebuilds
  • Gallery example: Large Dataset via data_url

Measured impact

  • Physical component: 1.8 MB → 35.3 KB
  • Country-polygon Dash props JSON: 323.4 KB embedded → 0.8 KB with data_url (~99.7% smaller)

Files touched

  • dash_globe/webpack.config.js
  • dash_globe/src/lib/fragments/DashGlobe.react.js
  • dash_globe/src/lib/fragments/largeData.js
  • dash_globe/src/lib/components/DashGlobe.react.js
  • dash_globe/dash_globe/data.py
  • dash_globe/dash_globe/globe.py
  • dash_globe/dash_globe/__init__.py
  • dash_globe/usage.py
  • tests + docs

Test plan

  • Unit tests: test_large_data.py, test_globe.py, test_usage.py (34 passed)
  • Confirmed Dash serves split chunks (async-three / async-h3 / async-globe-vendor)
  • Measured layout payload reduction for data_url showcase path
  • Manual WebGL hover demo (blocked in this agent VM by WebGL context creation limits)
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 2, 2026 16:28
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>
@jeffgallini
jeffgallini marked this pull request as ready for review September 2, 2026 21:50
@jeffgallini
jeffgallini merged commit 3ccb5b8 into master Sep 2, 2026
@jeffgallini
jeffgallini deleted the cursor/snappy-large-data-globe-4e31 branch September 2, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants