sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 3e238d891051a7ad7dbe6d6bc52e690ac66f11b7
parent 87fac66fea613a7e8d798da65dcd3552d4766817
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon, 25 May 2020 13:59:37 +0200

Revert "[st][patch][lowlatency] Introducing new patch for st called lowlatency."

This reverts commit 87fac66fea613a7e8d798da65dcd3552d4766817.

Assuming the author probably had good intentions, but the page contains too
much inaccurate and wrong information so it is reverted.

st has had work on improving the latency and drawing performance (less flicker):
https://git.suckless.org/st/commit/1d590910652519268152eae6b97cf30ace4e90c0.html

There you can lower the minlatency and maxlatency values. This is a better
solution than forcing drawing after each keypress as done in this patch
st.suckless.org/patches/lowlatency/st-lowlatency-0.8.3.diff
Which causes flicker and potentially reduce throughput aswell (as mentioned in
the notes section). The auto-sync patch (in master) does not have this issue.
Before the auto-sync patch it was already possible to increase the xfps and
actionfps causing lower latencies aswell (at some other costs potentially).

st was never as slow as the benchmark referenced on the page:
https://danluu.com/term-latency/
There the benchmarks are run with a Java application on MacOS:
"Measurements are with macOS unless otherwise stated."
This is not a reliable way to test. The proprietary MacOS is not supported
either.

For an accurate benchmark provide _atleast_:

* A listing of exactly all the versions used.
* System information.
* An FOSS OS (Linux, BSD).
* A reliable simple reproducable benchmarking tool (open-source of course).
* The exact dataset used for testing.

Diffstat:
Dst.suckless.org/patches/lowlatency/index.md | 65-----------------------------------------------------------------
Dst.suckless.org/patches/lowlatency/st-lowlatency-0.8.3.diff | 26--------------------------
Dst.suckless.org/patches/lowlatency/xterm_vs_st0.8.3_vs_stlowlatency.png | 0
Dst.suckless.org/patches/lowlatency/xterm_vs_stlowlatency_hist.png | 0
4 files changed, 0 insertions(+), 91 deletions(-)

diff --git a/st.suckless.org/patches/lowlatency/index.md b/st.suckless.org/patches/lowlatency/index.md @@ -1,65 +0,0 @@ -lowlatency -========== - -Summary -------- -Trivial patch that reduces input/output latency by selectively disabling the -built in frame rate limiting for `KeyPress` events. - -Description ------------ -According to the popular essay -[Typing with pleasure](https://pavelfatin.com/typing-with-pleasure/) -by Pavel Fatin public available research data comes to the conclusion that -"Delay of visual feedback on a computer display have important effects on -typist behavior and satisfaction" and even though not necessarily consciously -perceived can have an significant impact on typing speed, error rate, eye and -muscle strain and the required amount of conscious attention. - -Several publications \[[1](https://lwn.net/Articles/751763/)\],\[ -[2](https://danluu.com/term-latency/)\] that benchmarked latency metrics for -terminal emulators established that the latency performance of St is -consistently worse than that of XTerm or even that of Emacs eshell. -The reason for this is that st employs frame rate limiting configured by the -variable `xfps` in config.h in order to keep st from slowing down applications -with high output bandwidth. - -This patch disables the frame rate limiting for events that are caused by -keyboard input but keeps it intact for all other events and consequently should -not harm throughput performance. - -Benchmarks ----------- -These benchmarks are done using generic `amdgpu` drivers on Linux with default -configuration on a 60Hz refresh rate display employing the utility -[Typometer](https://github.com/pavelfatin/typometer) to measure the latency. - -[![Results Timeseries](xterm_vs_st0.8.3_vs_stlowlatency.png)](xterm_vs_st0.8.3_vs_stlowlatency.png) - -[![Results Histogram](xterm_vs_stlowlatency_hist.png)](xterm_vs_stlowlatency_hist.png) - -Throughput measured by time it takes to cat a 50MB file containing random data: - - Terminal real user sys - -------------------------------------- - XTerm 7.853s 0.255s 0.819s - St 0.8.3 4.347s 0.246s 0.655s - St lowlatency 4.371s 0.254s 0.638s - -**Conclusion**: The results show that the patch improves latency to the point -that it now beats previous leader XTerm without having impact on throughput. - -Notes ------ -* This patch will most probably show no effect if used in conjunction with a -compositor or any driver configuration that enforces global vsync. - -* In rare cases you might experience tearing while typing. - -Download --------- -* [st-lowlatency-0.8.3.diff](st-lowlatency-0.8.3.diff) - -Authors -------- -* Matthias Schoth - <mschoth@gmail.com> diff --git a/st.suckless.org/patches/lowlatency/st-lowlatency-0.8.3.diff b/st.suckless.org/patches/lowlatency/st-lowlatency-0.8.3.diff @@ -1,26 +0,0 @@ -From 6d7aa31dfde1bd38aa65ef4434930a9fa5b0b5e1 Mon Sep 17 00:00:00 2001 -From: Matthias Schoth <mschoth@gmail.com> -Date: Mon, 25 May 2020 02:30:41 +0200 -Subject: [PATCH] Trivial patch that reduces input/output latency by - selectively disabling the built in frame rate limiting for KeyPress events. - ---- - x.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/x.c b/x.c -index e5f1737..f6b7604 100644 ---- a/x.c -+++ b/x.c -@@ -1933,6 +1933,8 @@ run(void) - dodraw = 1; - last = now; - } -+ if (ev.type == KeyPress) -+ dodraw = 1; - - if (dodraw) { - while (XPending(xw.dpy)) { --- -2.26.2 - diff --git a/st.suckless.org/patches/lowlatency/xterm_vs_st0.8.3_vs_stlowlatency.png b/st.suckless.org/patches/lowlatency/xterm_vs_st0.8.3_vs_stlowlatency.png Binary files differ. diff --git a/st.suckless.org/patches/lowlatency/xterm_vs_stlowlatency_hist.png b/st.suckless.org/patches/lowlatency/xterm_vs_stlowlatency_hist.png Binary files differ.