Skip to content

feat(dgw): keep sparse live shadow streams moving - #2062

Draft
irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 2 commits into
masterfrom
exp/sparse-stream-fill
Draft

irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 2 commits into
masterfrom
exp/sparse-stream-fill

Conversation

@irvingoujAtDevolution

@irvingoujAtDevolution irvingouj@Devolutions (irvingoujAtDevolution) commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

RDP sources only send a frame when the screen repaints, so a live viewer can go seconds or minutes without a frame. Browsers then show nothing until the next frame and can freeze far ahead of the data. While a live clip is quiet, Gateway can now repeat the last picture at a fixed interval, trailing the source a little so a late frame isn't overtaken. Only live viewers are affected; the stored recording is unchanged.

Experiment behind SessionConfig::fill_interval (DGATEWAY_SHADOW_FILL_MS in Gateway) plus examples/sparse_fill.rs, a timed replay harness.
fill_delay (DGATEWAY_SHADOW_FILL_DELAY_MS) makes refills trail the source so a late source frame is not overtaken; refills now read already-written data first; count moved late frames; jitter injection in sparse_fill.
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Let maintainers know that an action is required on their side

  • Add the label release-required Please cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module) when you request a maintainer to cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module)

  • Add the label release-blocker Follow-up is required before cutting a new release if a follow-up is required before cutting a new release

  • Add the label publish-required Please publish libraries (`Devolutions.Gateway.Utils`, OpenAPI clients, etc) when you request a maintainer to publish libraries (Devolutions.Gateway.Utils, OpenAPI clients, etc.)

  • Add the label publish-blocker Follow-up is required before publishing libraries if a follow-up is required before publishing libraries

@irvingoujAtDevolution

Copy link
Copy Markdown
Contributor Author

Draft, experiment state. Report with all numbers: kept locally, summary here.

  • Off by default. DGATEWAY_SHADOW_FILL_MS / DGATEWAY_SHADOW_FILL_DELAY_MS turn it on (env vars are experiment-only, a real config option comes later). 500/500 is what I'd ship.
  • Chromium shadow-player on lab MsRdpEx recordings, loopback Gateway: off → first picture 29 s, 51-86 % of samples stalled; 500 ms → first picture 2.7 s, flat 2.6 s lag, no stalls; +500 ms delay → 3.1-3.4 s flat. Cost +50..85 kbps per viewer.
  • With injected push jitter, the 500 ms delay keeps late source frames from being overtaken up to 300 ms of jitter (0 vs 8-12 moved), 3-5 left at 1 s.
  • Also recovers frames the BestPerformance encoder drops (75 in → 54 out over 180 s); without it a dropped change can stay invisible until the next repaint.
  • examples/sparse_fill.rs is the timed replay harness, and the late_frames_moved counter is only there for it. Both go before this leaves draft.
  • Depends on fix(dgw): start shadow viewers at the live picture #2061 for the E2E rows to mean anything (join backlog dominated them).

Note

Human-tuned, LLM-assisted content.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant