From f3cd98288ab107e6e51dd6e976ec795b3a13e295 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sun, 17 Mar 2024 22:48:06 +0100 Subject: [PATCH] Root: increase transaction timeout to 100ms This was dropped from 200ms to 50ms in 4a65af66. However 50ms seems to be a bit too short in practice. I often hit ugly frame imperfection do to timeouts when toggling mpv between a small floating window and fullscreen for example, even on a relatively beefy desktop computer. This only happens while the video is playing in mpv, not while it is paused. I believe this is due to mpv ignoring the compositor's hints for when to render a new frame entirely while playing a video. It instead renders at the framerate of the video being played, even if the compositor requests a change in size. This isn't great but seems unlikely to change [1]. Overall, hitting 100ms timeouts subjectively doesn't feel anywhere near as sluggish as hitting 200ms timeouts and offers better frame perfection than 50ms timeouts in at least this one example, there are bound to be others. [1]: https://dudemanguy.github.io/blog/posts/2022-06-10-wayland-xorg/wayland-xorg.html --- river/Root.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/river/Root.zig b/river/Root.zig index 76b642f..be2242a 100644 --- a/river/Root.zig +++ b/river/Root.zig @@ -607,7 +607,7 @@ fn sendConfigures(root: *Root) void { root.inflight_configures, }); - root.transaction_timeout.timerUpdate(50) catch { + root.transaction_timeout.timerUpdate(100) catch { std.log.scoped(.transaction).err("failed to update timer", .{}); root.commitTransaction(); };