You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
linux-capture: XComposite video_tick does blocking X round trips per frame under the graphics lock #1356
Part of #1273 (found by the #1285 capture-plugin audit). B, graphics thread.
plugins/linux-capture/xcomposite-input.c.h:577-597: XComposite window capture's video_tick takes obs_enter_graphics() and then calls xcomp_window_exists() once or twice per frame. That is a blocking xcb_get_window_attributes request and reply.
Failure scenario: a busy, stalled or remote X server holds up video_tick, and every other graphics user with it, for one or two round trips per frame per XComposite source. Not a spin, but latency on the render path.
Fix:
Track the window's existence from X events already being watched (DestroyNotify, UnmapNotify and MapNotify through the existing watcher) instead of asking every frame.
Or at least do the check outside obs_enter_graphics() and the source lock, and at most once per frame.
Test: a counter around the existence check in a fake-connection test (or xcb call counting under Xvfb): with a stable window, round trips per second are about 0, not about the frame rate.
Claiming. Plan: track whether the captured window exists from the X events the watcher already receives (DestroyNotify / UnmapNotify / MapNotify), instead of a blocking xcb_get_window_attributes round trip 1-2 times per frame under obs_enter_graphics(). Keep a cheap, rate-limited check as a safety net. Builds on #1366's search backoff. RED: a pure helper test counts existence round trips per simulated second (about the frame rate today, about 0 with a stable window after the fix).
Activity
zackees commentedon Oct 18, 2026
Claiming. Plan: track whether the captured window exists from the X events the watcher already receives (DestroyNotify / UnmapNotify / MapNotify), instead of a blocking
xcb_get_window_attributesround trip 1-2 times per frame underobs_enter_graphics(). Keep a cheap, rate-limited check as a safety net. Builds on #1366's search backoff. RED: a pure helper test counts existence round trips per simulated second (about the frame rate today, about 0 with a stable window after the fix).test(linux-capture): RED, XComposite asks the X server whether its wi…
linux-capture: XComposite tracks window state from X events instead o…
docs(features): XComposite window state from X events (#1377)
test(linux-capture): RED, XComposite asks the X server whether its wi…
linux-capture: XComposite tracks window state from X events instead o…
docs(features): XComposite window state from X events (#1377)
test(linux-capture): XComposite capture follows map/unmap/destroy end…
linux-capture: XComposite tracks window state from X events instead o…
zackees commentedon Oct 23, 2026
Fixed by #1377 (merged). That PR used
Refs, so the issue stayed open, but its body lists no remaining work.