Use instancing for compact hexbin rendering#194
Draft
Alek99 wants to merge 1 commit into
Draft
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Greptile SummaryThis PR moves hexbin fan generation from CPU-expanded buffers into an instanced WebGL renderer. The main changes are:
Confidence Score: 5/5This looks safe to merge. No blocking issues found in the changed code.
What T-Rex did
Important Files Changed
Reviews (1): Last reviewed commit: "Use instancing for compact hexbin render..." | Re-trigger Greptile |
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.
Closes #175
Summary
Replaces the client-side six-way hexbin fan expansion with a dedicated instanced renderer:
HEXBIN_VSgenerates the six triangles fromgl_VertexID, using the same ring as the Python rendererHexbin remains intentionally non-pickable, so hover behavior is unchanged. Nonlinear and reversed axes, offset/scale metadata, continuous and categorical color, colorbars, and retained-payload GL reconstruction are covered.
Performance evidence
Fresh Chromium/SwiftShader benchmark, grid size 256, 66,049 occupied cells, 9 repetitions:
That is an exact 14× / 92.86% resident-buffer reduction. Both implementations rendered 4,528 nonblank pixels with pixel hash
3904178501and GL error 0.An independent review reran the same comparison at 16,641 occupied cells:
3001618805, GL error 0Verification
tests/reflex_adapter/test_assets.py::test_client_source_is_the_installed_bundlestale literal-marker assertion, reproduced on untouchedmainnode js/build.mjs --check: committed bundles freshtsc -p js/tsconfig.json --noEmit: passedruff check .: passedruff format --check .: all 343 files formattedgit diff --check: passedA reproducible benchmark is committed as
benchmarks/bench_hexbin_client.py.