Commit graph

15 commits

Author SHA1 Message Date
Kovid Goyal
bf37d5841b
benchmark kitten: Add scrollback and render benchmarks and --output
Replace the --with-scrollback and --render flags with two new
benchmarks, scrollback and render, that use the ASCII text with the
main screen and with rendering allowed, respectively. All other
benchmarks use the alternate screen with rendering suppressed. Add an
--output flag to also write the results to a file as JSON and list the
available benchmarks with descriptions in the help text.
2026-11-16 13:43:40 +05:30
Kovid Goyal
bd353afb9c
Intern cell styles and store only CPUCells in the scrollback
The formatting of cells (colors and SGR attributes) is now interned per
screen in a StyleTable and cells store a 17 bit index into it in the
previously unused bits of CPUCell. Render data (sprite and mark) is kept
in a separate RenderCell array for screen lines and in a small render
cache for history lines being displayed, so the scrollback stores only
CPUCells, 12 bytes per cell instead of 32. GPUCell is now only the upload
format, built from the CPUCell, its style and its RenderCell.

When the table fills up, it is compacted at the start of drawing text,
reducing the color precision of cells in the scrollback if needed, cells
on screen always keep their exact styles. The map from styles to indices
is a verstable set of indices with a small cache of recent styles in
front of it.

benchmark.py throughput: ascii +48%, unicode +29%, csi +10%, truecolor
text -22%, truecolor half blocks -9%.
2026-11-16 13:43:40 +05:30
Kovid Goyal
65da47b611
More detail for on_quit events and a new on_cwd change event 2026-11-12 11:29:08 +05:30
Kovid Goyal
dea9d877ff
Add a tab bar benchmark to benchmark.py
Times laying out and drawing the horizontal tab bar for every built-in
style with 10, 50 and 200 tabs. Use --compare-with to also time
kitty/tab_bar.py as it is at some git revision.
2026-10-10 09:03:52 +05:30
GhostCoder6969
ba7c4e7834 Fix typo 2026-10-03 06:06:50 +00:00
Kovid Goyal
e62ec6d540
Throughput improvements when processing large blocks of text
Mostly comes from detecting the case of runs of ASCII printable
characters and using a special fast path for them. Improves benchmarks
as per benchmark.py by 15-30% for text heavy workloads
2026-08-16 17:47:56 +05:30
Kovid Goyal
69025901b3
Dont hardcode /tmp 2026-08-16 17:01:27 +05:30
Kovid Goyal
9ba59a16c1
More benchmark script improvements 2026-08-16 11:59:42 +05:30
Kovid Goyal
f5ae245f65
Switch to perf for profiling from gperftools 2026-08-16 11:24:41 +05:30
Kovid Goyal
a432ef3774
Allow controlling exactly what is benachmarked by benchmark.py 2026-08-16 10:41:30 +05:30
Kovid Goyal
896fc0c36a
Improve benchmark script
It now benchmarks the I/O thread as well for results much closer to what
you get when running in real kitty
2026-08-12 15:37:22 +05:30
Kovid Goyal
7f0b072f0d
autoformat 2026-08-05 05:32:56 +05:30
Kovid Goyal
62580c855b
Make mypy 1.16 happy 2025-05-30 10:06:38 +05:30
Kovid Goyal
a855bcf9dc
... 2024-11-28 22:37:20 +05:30
Kovid Goyal
bacfb436e9
Code to run the benchmark kitten headlessly 2024-11-04 09:10:08 +05:30