Commit graph

25 commits

Author SHA1 Message Date
Kovid Goyal
13c7980ab4
Speed up processing of text that scrolls the screen
Lines scrolled onto the screen no longer have their render data cleared,
instead they are marked dirty so that rendering recomputes it, except when
there is a marker, as marks are render data used without rendering. This
reduces the memory written to clear a line by 40%.

The ASCII fast path in draw_text no longer checks for multicell cells in
a line that was just cleared by a line feed scrolling the screen, until
something that can create multicell cells happens.

Together these make the ascii benchmark ~14% and the scrollback and
render benchmarks ~8% and ~14% faster. Also update the throughput
numbers in the performance docs, using the median of several runs.
2026-11-16 13:43:41 +05:30
Kovid Goyal
a49882a5f9
Update performance docs 2026-11-16 13:43:41 +05:30
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
8efb82b5b8
Replace sync_to_monitor and repaint_delay with render_interval
The new render_interval option either syncs redraws to the monitor
(the default), optionally with a minimum interval between frames, or
redraws on a schedule with a minimum interval between frames. The
interval is now enforced per OS window, including when output is being
parsed, which the old repaint_delay was not.

On X11, render frames are now provided by the Present extension, with
libxcb-present loaded at runtime. Frames are requested lazily on X11,
since a pending NotifyMSC request delays buffer presentation by the GPU
driver under Xwayland. Xwayland completing requests early and failing to
report vertical blanks for long periods are handled. Without Present,
kitty falls back to blocking buffer swaps as before.

Render frames now only wake up the main loop when something is waiting
for them, so animations such as the eased cursor blink are no longer
sampled at the monitor refresh rate. On Wayland, frame callbacks are
also used when not syncing to the monitor, to stop rendering hidden
windows.

The removed options are converted to render_interval if it is not
specified anywhere, including in other config files and overrides,
otherwise they are ignored with a warning.

Also fix gen config failing on options whose type is a builtin.
2026-11-16 13:43:39 +05:30
Kovid Goyal
752bf496a8
Remove input_delay and parse output as soon as it is received
Holding large chunks of input for input_delay left the parser idle about
30% of the time during bulk output: the parser started only when the
buffer was nearly full, and freed space only at the end of a pass, so the
I/O thread could not read while the parser worked.

Now the I/O thread wakes the main loop whenever new input arrives and no
wakeup is already outstanding, and a parse pass compacts the buffer as it
goes, waking the I/O thread if the buffer had filled up. A pass parses at
most 1MB of input so that a continuous stream cannot starve rendering and
event handling.

This raises parser utilization during kitten __benchmark__ from ~70% to
~97% and throughput by 12% to 30% depending on the kind of output.
2026-11-16 13:43:38 +05:30
Kovid Goyal
f5ae245f65
Switch to perf for profiling from gperftools 2026-08-16 11:24:41 +05:30
Stefan A. Haubenthal
33f278b477 Fixed typos 2025-05-18 15:16:56 +02:00
Kovid Goyal
67314bf2fb
Add settings that are optimal for latency 2024-04-06 11:48:55 +05:30
Kovid Goyal
c5a10d19a4
Update the changelog 2024-02-25 10:49:22 +05:30
Kovid Goyal
8639a2ac40
Update perf figures based on latest code 2024-02-25 09:57:42 +05:30
Kovid Goyal
3abdc54e4b
... 2024-02-25 09:57:41 +05:30
Kovid Goyal
618aeec709
Finally got gnome-terminal to run on my system
Apparently it needed some kind of GTK desktop portal or the other
🙄

Interesting that its numbers are basically the same as alacritty's. Lot
better than I remember, I guess the recent libvte performance work was
good.
2024-02-25 09:57:41 +05:30
Kovid Goyal
2549b4328f
Update throughput comparison table in light of latest improvements 2024-02-25 09:57:40 +05:30
Kovid Goyal
b237e1b99f
... 2024-02-25 09:57:36 +05:30
Kovid Goyal
4fbb70d89e
Explain the purpose of the CSI column 2024-02-25 09:57:35 +05:30
Kovid Goyal
5c3e54dede
Note that konsole and xterm dont support synchronized update 2024-02-25 09:57:35 +05:30
Kovid Goyal
5721b1315e
... 2024-02-25 09:57:35 +05:30
Kovid Goyal
85fcac2a61
Add throughput performance numbers 2024-02-25 09:57:35 +05:30
pagedown
13303416b8
Docs: Improve the documentations
Add more text roles and links.
Fix typos.
Adjust the default shortcut order in overview.
Notes on the impact of kitty-open.desktop on the default open apps.
Document KITTY_DEVELOP_FROM in glossary.
Add Python type hints to the watcher example.
Mention clone-in-kitty in launch --copy-env.
Fix remote control ls example does not work, by escaping the backslash.
2022-04-30 17:07:36 +08:00
Kovid Goyal
f787a377c3
A new theme for the kitty website
Supports dark mode. Also re-organize the documentation
a bit, making it more hierarchical.

Have a nicer landing page
2021-07-18 13:29:33 +05:30
Kovid Goyal
9135387cfa
Get rid of the various different launchers
Now there is only one launcher. Which means it can be used to start
kitty with profiling and ASAN in the natural way. The recommended
way to run kitty from source is now:

./kitty/launcher/kitty

The launcher also automatically re-execs to resolve symlinks on macOS.
2019-06-24 17:21:30 +05:30
Kovid Goyal
d6b70f10d3
Cross-linking options in the docs 2018-09-06 11:02:53 +05:30
Kovid Goyal
c994bc1d89
Add more clarification about kitty's performance goals 2018-06-15 13:51:49 +05:30
Kovid Goyal
727028280a
... 2018-06-05 08:46:40 +05:30
Kovid Goyal
f82b7841c6
Start work on a kitty website
Port the current asciidoc documentation to sphinx
2018-05-29 21:03:50 +05:30