diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-12 05:03:42 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-12 05:08:44 +0000 |
| commit | 9ac03315958c20b1f6c0bac0988033d007c3d977 (patch) | |
| tree | 34cca080b0282f7df2889e189e8dd82bfc5e4e45 /util/sbase/unlink.c | |
| parent | 2c3d0b5a3e681bfa9f978fc9f343219f01cc023e (diff) | |
util/spkmodem-recv: buffer calls to fread()
we currently read small amounts of data with fread,
repeatedly, which is quite taxing on the CPU, on
very old systems.
48khz audio. 48000 calls to fread() per second?
yeah. let's optimise this.
performance now should be roughly O(1) in practise.
this and the other recent changes means no modulo
or division, reduced branching, memory memory roads,
and lots of buffering.
the buffering here is quite conservative, so the human
won't notice any difference. we're cutting the number
of times we call fread by a factor of several thousand,
but you'll still see text scrolling down pretty quick,
with minimal lag.
the old GNU code i forked was terrible at this.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/sbase/unlink.c')
0 files changed, 0 insertions, 0 deletions
