Explorer v2 behind ?v=2 (lite parquet, lazy description, no RANDOM, lazy Cesium)#126
Merged
rdhyee merged 1 commit intoisamplesorg:mainfrom Apr 17, 2026
Merged
Conversation
…RANDOM, lazy Cesium) Four architectural moves, each gated on ?v=2. v1 stays unchanged. 1. Primary read surface: samples_map_lite.parquet (60 MB) instead of wide.parquet (278 MB). The lite file has every column the Explorer needs for the list + globe view except description. 2. No ORDER BY RANDOM(). v1 uses RANDOM() which forces a scan across row groups; v2 uses bare LIMIT, accepting row-order bias in exchange for ~20× query speedup on columnar parquet. (Trade-off acceptable for a viz sample; revisit if source clustering becomes visible.) 3. Lazy description fetch. v2 drops description from sampleData and adds a lazyDescription cell that queries wide.parquet for just the one pid when a sample is clicked. sampleCard falls back to lazyDescription when s.description is empty. 4. Lazy Cesium mount. v2 returns null from the viewer cell until viewMode === 'globe', so the viewer constructor (~500 ms) doesn't run for users who stay in list/table view. v1 mounts eagerly. whereClause handles column-name drift (v1 uses `n`, v2 uses `source`) and skips the otype filter for v2 (lite is samples-only). Text search in v2 is limited to label + place_name (description isn't loaded eagerly). v1 keeps description search. Next: measure v2 and compare against the PR isamplesorg#124 baseline. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
63ac873 to
8f48ba8
Compare
Contributor
Author
v2 results (3 cold runs on production, headless Chrome, cache disabled)
Meaningful — sample data query cut nearly in half, overall time-to-usable dropped ~6 seconds. But less than expected (we hoped for 4–10×, got ~2×). Why it's not morev2 still makes 113 range requests to the lite parquet on initial load. Switching file size 278 MB → 60 MB only helped so much because the bottleneck isn't total bytes — it's DuckDB-WASM's many small range requests + the facet subquery join against Where the real wins likely are next
StatusPaused here. v2 is live behind |
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.
Second of two PRs for the Explorer rethink. v1 untouched; opt-in v2 via
?v=2.Four moves (each gated on version):
samples_map_lite.parquet(60 MB) instead ofwide.parquet(278 MB).ORDER BY RANDOM()— bareLIMITis ~20× faster on columnar parquet; accept row-order bias for now.wide.parquetfor just one pid when a sample is clicked.viewMode === 'globe'.v1 baseline captured in PR #124's panel:
v2 expected to slash these by a factor of 4-10. Measured via the same
?perf=1panel — will post numbers after merge.🤖 Generated with Claude Code