[dev] Re: [st] Drawing optimizations

From: Christian Neukirchen <chneukirchen_AT_gmail.com>
Date: Fri, 21 Oct 2011 13:43:29 +0200

Aurélien Aptel <aurelien.aptel_AT_gmail.com> writes:

> Hi,
>
> I know st rendering is slow. I'm currently trying out different
> solutions but I can tell you profiling X calls is no fun.
>
> tip now uses a simple dirty flag per line algorithm.
> Each modified line has the flag set to 1. Only dirty lines are drawn
> and once it's done their flag is set back to 0.
> I've noticed a significant speed up. I'll try more ideas in the near future.

I don't know jack about efficient X11 use, but toying around with xtruss
showed that xterm mostly uses ImageText16, urvxt uses PolyText8 and
RenderFillRectangles when XRENDER is available and ImageText16 else,
whereas st uses PolyText8 and PolyFillRectangle only.

Perhaps its faster to draw onto an image and then display that? (urxvt
also does the optimization of only updating the window at screen
frequency or something, so it doesn't render all lines of text flushing
by.)

-- 
Christian Neukirchen  <chneukirchen_AT_gmail.com>  http://chneukirchen.org
Received on Fri Oct 21 2011 - 13:43:29 CEST

This archive was generated by hypermail 2.3.0 : Fri Oct 21 2011 - 13:48:03 CEST