[dev] [st] Drawing performance

From: Galos, David <galosd83_AT_students.rowan.edu>
Date: Sun, 29 Jan 2012 05:48:30 -0500

I've written a patch which drastically improves st's performance
in interactive console applications, like htop, vim or alsamixer.
However, catting /dev/urandom is actually worsened , because
of XCopyArea overhead. The method used was actually to make
st dumber. Rather than doing any accounting, in every function
which updates the terminal model, I make an analogous X11 call,
to update the pixmap. The calls to draw are then replaced by
xrefresh, which simply XCopyArea's the pixmap onto the window.

Ideally, I could detect whether the process was bursting, then
disable all the X calls, and use the naive draw to fill the window
once every 40ms. (or, if that's too slow, draw directly on the
window, and stop when I run out of time)

The patch also reworks the Selection code, both for clarity, and
to let you see what you select as you drag your mouse around.

The patch is here: galos.no-ip.org/st-0.1.1-fast.diff

David Galos
Received on Sun Jan 29 2012 - 11:48:30 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 29 2012 - 12:00:07 CET