alacritty: Performance regression in scrollback
I’ve just tested the scrollback PR because I wanted to make sure that scrolling is still faster than on master, and it is. However, while testing it I’ve noticed that there were some significant regressions comparing current master to the scrollback PR.
Test Results:
Test | Master | Scrollback |
---|---|---|
scrolling | 6s | 4.4s |
alt-screen-random-write | 8.5s | 12s |
scrolling-in-region | 4s | 13s |
These tests are based on https://github.com/jwilm/alacritty.
I’m not sure why I haven’t noticed this earlier, but it seems like these regressions have been present ever since the scrollback PR was created. Especially the regression in scrolling-in-region
seems quite massive.
These results were captured on X11/i3/compton/amd/mesa.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (19 by maintainers)
So MacBook Pro 13 inch Iris 550 here, some weird times, discussed with chrisduerr on irc without an idea whats going on. Tested fullscreen.
cargo run --release -- -b 50000000 -w $(tput cols) -h $(tput lines) -c alt-screen-random-write > out.vte
some 70MB plain text file, just if that helps
I’m not quite sure. There definitely is still a regression from master to scrollback when it comes to alt-screen-random-write. However the obvious stuff has been fixed.
I’d still like to keep track of places where a potential performance improvement could be achieved, but since I haven’t been able to figure out how to resolve this and the performance hit is not massive, I wouldn’t block scrollback on this.
So I’d either keep this open to track that or maybe open a new issue to indicate that the main issues mentioned in here have been resolved.
I just went through some debugging and performance testing with @chrisduerr on IRC. And we discovered some discrepancy between timing
vtebench
directly, and with timingcat some-output-of-vtebench
. I’ve rerun all the performance tests from @jwilm’s comment above.The format of this test session is as follows.
I’m lazy and I don’t want to format them as beautifully as he did however, sorry.
This somewhat clearly shows how
vtebench
itself was a bottleneck for thealt-screen-random-write
tests. I’ll let @chrisduerr followup if he has anything else to add. It’s also worth noting for anyone else following this thread, that these performance numbers are highly dependent on the screen size, and basically all of the configuration options, not to mention the host machine. So it’s only relevant to compare the percentage difference betweenmaster
andscrollback
, and the two different methods of running. This should be somewhat obvious.Relevant system info. I use X11, running
i3
. My video card is a GTX 980 runningnouveau
drivers. Some additional info below:Ok, I’ll give it a shot on a few of my systems. I might need a little hand holding, I’ll just find someone on IRC if I do.
Disabling branch by replacing the instruction with
if false && region.start == Line(0) {
fixes all performance issues with scrolling-in-region. So the culprit is probably in there.