Suppress redundant served viewport requests#195
Draft
Alek99 wants to merge 1 commit into
Draft
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Greptile SummaryThis PR suppresses redundant viewport requests when the accepted result is still represented by live GPU state. 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: "Suppress redundant served viewport reque..." | 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 #168
Summary
Adds bounded, correctness-checked client no-op suppression for viewport work whose latest accepted reply is already represented by live GPU state:
The independent review found and fixed a failure-atomicity gap: an invalid reply could mutate an in-place GPU buffer and then throw while the old accepted key remained live. The cache slot is now invalidated before the first fallible decode/upload, and a real-browser regression injects a partial mutation followed by an invalid buffer and proves that returning to the old view retries.
This deliberately covers exact accepted-request no-ops. Tile-keyed density reuse and edge-tile shipping remain explicitly documented as pending future work; this PR does not claim them.
Performance and wire evidence
Reproducible benchmark: 120,000 points, combined decimated line plus density/drill viewport, 21 repetitions.
The browser lifecycle suite also verifies exact hits cause no messages while changed views, pixels, generations, axes, traces, partial state, or invalidated GPU objects continue to request normally.
Verification
tests/reflex_adapter/test_assets.py::test_client_source_is_the_installed_bundle; the identical stale minified-bundle literal-marker assertion was 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: passedThe deterministic wire/kernel benchmark is committed as
benchmarks/bench_served_view_memo.py.