Repository navigation
Fix deferred input batching (#4436) - #4438
Open
LeonidasZhak wants to merge 1 commit into
Open
LeonidasZhak wants to merge 1 commit into
LeonidasZhak wants to merge 1 commit into
Conversation
This branch has not been deployed
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
Batch deferred inputs into one queued WebSocket send.
Thanks to maintainers
Thanks for maintaining Shiny and for the focused reproduction and implementation clue in #4436.
Issue or motivation
Several deferred input updates currently enqueue separate tasks. The first sends all values and the remaining tasks send empty messages, adding unnecessary server input cycles.
Root cause
sendIsEnqueuedwas checked but remainedfalseuntil the queued callback ran, so every call passed the guard.Change
Set the flag before enqueueing the task, add a TypeScript regression test, rebuild the generated Shiny bundles, and record the fix in NEWS.
Tests
npm run buildpasses, including TypeScript compilation, all six unit tests, 98.05% type coverage, dependency analysis, and bundle generation.R CMD build --compact-vignettes=gs+qpdfpasses._R_CHECK_CRAN_INCOMING_REMOTE_=false R CMD check --as-cran --no-manualpasses with one NOTE for the development version number. The remote incoming probe stalled before package checks, so only that remote probe was disabled on rerun.pkgdown::build_site()and the reference-index check pass.Scope
This fixes client-side deferred batching only. Event-priority sends and server-side input processing are unchanged.