Re: Re: how to write snappy benchmark?

Havoc Pennington <[email protected]>
Newsgroups gmane.comp.xfree86.forum
Message-ID <[email protected]>
On Sun, Jul 06, 2003 at 02:56:41PM +0200, Gregor Burger wrote:
> > A good base for benchmark is:
> >
> > $ while true ; do xrefresh ; sleep 0.1 ; done
> >
> 
> I just tried this. the whole desktop flickers; every app with the 
> exception of xmms.
> why is that? can we get some information out of this? 
> 

The current tradeoffs are that an app can set its window background to
a solid color (in which case when the window is refreshed it's cleared
to solid, and the app repaints); an app can set its window background
to "none" (in which case when the window is refreshed the screen
contents are left as-is); or an app can set its background to some
pixmap.

The solid color is most commonly used and produces a slight flash on
refresh. The background none addresses the xrefresh case, but creates
the weird artifacts Owen mentioned when for example you do an opaque
window drag over the window or switch workspaces.

If you set the background pixmap to exactly the current contents of a
window, you could avoid flashing, which is what we were discussing a
bit. However, there is a memory cost (you have a large pixmap the size
of every window).

The issues here are pretty well understood, just a matter of picking
your tradeoff.

Havoc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.