This time I wanted to do some more thorough looking at the data before deciding on the thresholding approach, but it seems that the plotly frontend starts to really struggle when you feed it several seconds of data sampled multiple times per millisecond
Got some initial results on the terminals.
As expected, VTE is *really slow* on big window sizes on Wayland due to Cairo and weird repaint timing logic. But what is Black Box doing to lose more than a refresh cycle?
Glad to see Alacritty still on top, but apparently Foot is a tiny bit faster on this test. Kitty loses one refresh cycle for some reason.
Added Contour terminal (how come there are so many new terminal engines written from scratch lately, yet no new GTK 4 terminal widget?)
Now for something different: emulators! Here "New Highscore" is the work-in-progress Highscore rewrite @alice is working on, "Old Highscore" is the current latest Highscore git commit, and "GNOME Games" is the latest Games from Flathub.
It's quite interesting how RetroArch seems to have a two-frame spread rather than one, something's off in its processing. Also interesting how MGBA is one frame slower than Gambatte. For Highscore, good to see GTK 4 improving the latency.
Today I've been visited by kchibisov (Alacritty maintainer) and we've spent several hours benchmarking terminals and editors.
For this test we measured a complex drawing test from vtebench[1]. Key press fills the screen with a complex pattern. I measure the latency from the key press to seeing the pattern at the end of the screen.
Foot ended up firmly ahead, followed by Kitty and Alacritty. Other terminals struggle a bit more with it.
Next, a more interesting test: editors. For terminal editors I used Alacritty, and I've also added the fast and the slow baselines from the previous tests.
Here Neovim and Helix in text mode are the fastest, followed by nano, which has more spread for some reason. Next we have G-T-E and Builder with quite a bit of spread (@hergertme@fosstodon.org, any idea what's going on here?), then Helix and Neovim with IDE functionality, and finally VSCode.
2 years ago VSCode was better; maybe my extension setup changed
Moar measurements: compositors. Since for this test the key presses are slow and there's no continuous redrawing, this should boil down to the amount of work a compositor does on screen update.
Un-vsynced X11 is obviously the fastest; thankfully work to add tearing flips to kernel and Wayland is ongoing.
Surprised to see GNOME Shell be a bit slower than raw Mutter, especially in fullscreen, since it doesn't really do much extra there. Extra surprised GNOME X11 is faster; might be noise.
You might've heard that VTE got faster in GNOME 46. But how much faster?
I measured it with a hardware input latency tester! The answer is: *a lot* faster. Read all about it here: https://bxt.rs/blog/just-how-much-faster-are-the-gnome-46-terminals/
For anyone following along, this is also finally the blog post where I explain in some detail how the latency tester works and what is shown on the plots.
@lanodan it's a tech demo / kitchen sink compositor from Smithay: https://github.com/Smithay/smithay It's by no means fully fledged or optimized, so don't take this as a measure of Smithay's potential performance, but I just wanted to check it out of curiosity.
@YaLTeR will there be kwin comparisons?
@ngz0 not sure, it would require installing a lot of the KDE session, and last I've heard it could mess up some of my GNOME configuration.
@YaLTeR i3 without a compositor being slower i3 with a compositor is unintuitive.
@YaLTeR I think you may have encountered picom's automatic unredirection, where it will effectively disable itself for maximized windows.
Maybe try this test with using a transparent background color in the test client, since that will force compositors to actually do some compositing.
@mattiasb well, a compositor is an extra step in the pipeline, so getting lower numbers with more work is unintuitive. But in this case it's essentially the same
@YaLTeR Sorry if you already covered this somewhere, but how did you determine that vte's accessibility implementation contributes to the remaining latency gap? Do you know which functions are adding latency, even when no screen reader or other accessibility tool is running?
@matt Hey! I did not determine that. It is a possibility that a11y is what makes GNOME Terminal worse than the GTK 4 terms (which currently have it disabled), but I haven't tested it.
The reason to write this is that a11y, at least in the GTK 4 VTE, is known to be slow, so much so that Ptyxis has an off-by-default setting for it. There are plans upstream to try to speed it up though.
You can toggle the enable-a11y property on the terminal widget to test it.
@YaLTeR Is there an issue or discussion about a11y being slow in GTK 4 VTE, where I can read more details? I ask because I'm doing some work on GNOME a11y. Thanks.
@matt uhh, can you contact Christian Hergert about this? I believe he implemented it and he's been the one telling me about this.
@YaLTeR OK, thanks.
@YaLTeR I asked in the GNOME Accessibility chat room and was referred to this issue filed by Christian Hergert: https://gitlab.gnome.org/GNOME/gtk/-/issues/6459
The new accessibility architecture I'm working on, assuming it reaches production, will fix this for the case where no screen reader or other AT is active.
@matt That sounds great!
@YaLTeR
That's wonderful!
Yet I dare ask: are #font #ligatures going to be added?
@downey