by frankenst1 · 5y ago · 0 comments
Chrome has 1 to 2 frames (17ms to 33ms on a 60Hz display) of additional, unnecessary input lag when compared to Firefox:
https://bugs.chromium.org/p/chromium/issues/detail?id=460919
[1] https://www.vsynctester.com/
[2] https://phoboslab.org/log/2012/06/measuring-input-lag-in-bro...
Like switching to the Classic Theme from Aero in Windows 7[1], as far as I can tell, this removes at minimum 1-2 frames of input lag (typing, mouse movement, etc.) throughout all of macOS.
In Firefox's about:config, after setting
user_pref("accessibility.force_disabled", 1) user_pref("general.smoothScroll", false) user_pref("general.autoScroll", true)
, I'm shocked by just how slow and laggy Chrome's builtin smooth scrolling implementation feels by comparison. In fact, it's so bad that I now open Chrome and all Electron apps with
open -a Google\ Chrome --args --disable-smooth-scrolling --disable-gpu-vsync --disable-frame-rate-limit open -a Slack --args --disable-smooth-scrolling open -a Spotify --args --disable-smooth-scrolling
You used to be able to disable Chrome's smooth scrolling with chrome://flags/#disable-smooth-scrolling, but that flag was removed for whatever reason.
I'm also surprised by how much faster Firefox's builtin middle mouse click autoscroll is compared to Chrome's ersatz AutoScroll[2] extension.
[0]: https://download.developer.apple.com/Developer_Tools/Additio...
[1]: https://pavelfatin.com/typometer/
[2]: https://chrome.google.com/webstore/detail/autoscroll/occjjkg...
user_pref("accessibility.force_disabled", 1)
user_pref("general.smoothScroll", false)
user_pref("general.autoScroll", true)
---
# --disable-frame-rate-limit is buggy on macOS
open -a Google\ Chrome --args --disable-gpu-vsync --disable-smooth-scrolling
open -a Slack --args --disable-frame-rate-limit --disable-gpu-vsync --disable-smooth-scrolling
open -a Spotify --args --disable-frame-rate-limit --disable-gpu-vsync --disable-smooth-scrolling
Are you using a >120Hz Monitor or don't you care about the occasional tearing?
https://developers.google.com/web/updates/2019/05/desynchron...
We added this for low latency drawing in Keep and Chrome Canvas and the ChromeOS PDF annotation mode.
AFAIK DWM is the main culprit here (1-2 frames) and `desynchronized` does not circumvent it (but avoids at best 1 frame of canvas vs DOM synchronization).
I'm pretty sure that's what most games use to bypass the forced DWM vsync. For example, when I used Dolphin on one of those cheap 60hz IPS LCD monitors with no internal scaler, I always preferred the lower latency + tearing in exclusive fullscreen compared to the laggy + smooth windowed mode. There was honestly such a stark difference between the two that I found the game to be unplayable in DWM's windowed vsync mode.
[0]: https://devblogs.microsoft.com/directx/demystifying-full-scr...
edit: to answer my own question, it looks like Chrome does not use exclusive fullscreen https://news.ycombinator.com/item?id=28784108
It has complex and non-obvious effects. greggman on the three.js issue wrote a really nice summary on why it shouldn't be the default.
It's really only appropriate for highly latency sensitive applications, like drawing or certain games.
Modern GPUs have staggered rendering where one frame is rendered while the previous frame is postprocessed (that's a bit simplified, it's more like a waterfall with a bunch of different steps). That sort of a conveyor belt-like operation always induces latency, and a struggling GPU increases the time it takes the frame to hit the screen. We blame the frame rate, but in reality that's just another symptom of what's causing the perception of sluggishness, rather than the cause itself.
Display latency from LCDs are another factor - something that was completely absence on CRTs.
Not for me. When scrolling in Firefox I see pauses of about 0.5 seconds every 10 seconds or so, on all websites. After the end of each pause, scroll position jumps, as if the rendered suddenly catches up with the target position.
Similar pauses when entering text in a form
I tried playing agar.io on Firefox 93 a few days ago and it was unplayably janky.
I've been using Firefox for 20 years. This problem arrived in the last year, roughly, and has been annoyingly consistent since it arrived.
I don't like Chrome. But it feels more fluid to use because I've never noticed this level of periodic stalls. It has the feel of a difference in garbage collection strategy.
https://www.youtube.com/watch?v=YR0vNs0ZdWI
Not sure how it behaves on windowed modes. For instance, Doom Eternal's fullscreen is actually composited on the desktop (could be a Vulkan thing), but doesn't seem to suffer from DWM overhead, latency wise.