Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add medium_cells benchmark #41

Merged
merged 3 commits into from
Dec 25, 2024
Merged

Conversation

chrisduerr
Copy link
Member

This patch adds a new benchmark which aims at filling a gap between the dense_cells and the light_cells benchmarks, providing a more realistic example of escape sequence density in a normal terminal workflow.

The new benchmark is an Alacritty ref test recording of a short NeoVim session, which includes several small and large buffer movements, different styles of underlines, and window-in-window using a fuzzy finder and tiled buffers.

This new test intentionally uses a workflow that is pretty escape sequence heavy, while still being realistic, since workflows without heavy escape sequence use are already reasonably well covered by the light_cells benchmark.

Closes #40.


Runtime locally seems slightly above light_cells (~9ms) at ~13ms.

This patch adds a new benchmark which aims at filling a gap between the
`dense_cells` and the `light_cells` benchmarks, providing a more
realistic example of escape sequence density in a normal terminal
workflow.

The new benchmark is an Alacritty ref test recording of a short NeoVim
session, which includes several small and large buffer movements,
different styles of underlines, and window-in-window using a fuzzy
finder and tiled buffers.

This new test intentionally uses a workflow that is pretty escape
sequence heavy, while still being realistic, since workflows without
heavy escape sequence use are already reasonably well covered by the
`light_cells` benchmark.

Closes alacritty#40.
@chrisduerr chrisduerr requested a review from kchibisov December 20, 2024 21:12
@nixpulvis
Copy link

Running this now leaves some junk in my prompt afterwards. Tested using alacritty in sh:

6;2$y0u6c11;rgb:1616/1616/16162026;2$y0u6c11;rgb:1616026;2$y0u6c11;rgb:1616/1616/1616202

also noticeable with fish:

[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616/1616/1616[?2026;2$y[?0u[?6c]11;rgb:1616

I'm just mentioning it here in case someone else notices this too. I don't think it's anything wrong in the benchmarks, but an unresolved issue in alacritty that I've lost track of.

@chrisduerr
Copy link
Member Author

I'm just mentioning it here in case someone else notices this too. I don't think it's anything wrong in the benchmarks, but an unresolved issue in alacritty that I've lost track of.

It's not really an unresolved issue in any way. This is just the terminal responding to some of the queries made by NeoVim during the benchmark.

@chrisduerr
Copy link
Member Author

Just to follow-up on your question @nixpulvis, since I've looked into possible ways to improve this:

The issue here is obviously that Alacritty on itself is writing replies to the terminal asynchronously. This is particularly problematic because the application itself could already be shut down by the time the reply arrives.

I played around a bit with trying to non-blockingly drain STDIN, but everything I've tried has just been a giant mess and only worked relatively unreliably (at least without timeouts). So I think it's easier to just consider the terminal the benchmark is executed in somewhat sacrificial, or at least having to do some minor 'cleanup' after the run completes.

@kchibisov kchibisov merged commit e5e9bf3 into alacritty:master Dec 25, 2024
1 check passed
@chrisduerr chrisduerr deleted the medium_cells branch December 25, 2024 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add benchmark with realistic escape sequence frequency
3 participants