Re: Snappy GUI response

Owen Taylor <[email protected]>
Newsgroups gmane.comp.xfree86.forum
Message-ID <[email protected]>
On Sun, 2003-07-06 at 17:34, Havoc Pennington wrote:
> On Sun, Jul 06, 2003 at 12:15:11PM -0700, David Jeske wrote: 
> > I'm unclear on how to determine when the server is done rendering
> > (i.e. #5). Is there a straightforward way to do this? If I put a
> > ClientMessage (to myself) into the queue at the end of an expose, can
> > I reasonably assume (on xfree) that I won't receive my client message
> > back until after the pixels are actually on screen? Is there a better
> > way to do this?
> 
> I'd just end timing after GTK processes the first expose event on the
> new window, which should be close enough to the right thing. If you're
> timing in a separate process from the one that's drawing, sending a
> client message after handling the first expose seems like a reasonable
> way to notify the separate process. You could include gettimeofday() 
> in the client message so time to send and process the message won't be
> included in the time.

What I'd do to get a pretty accurate number for the whole process
of popping up, say, a menu off of a button press is after GTK+
handles the expose for the toplevel 
(g_signal_connect_after (menu,"expose_event"...) 
change a property on the server, then compare the X server timestamps
for:

 - The original button press
 - The property notify resulting from the property you change

It doesn't account for the graphics card pipeline, but while that
may be important in graphics primitive micro-benchmarks, I don't
think it's large enough here to be important.

The other thing it doesn't account is the time from the mouse generating
the event until the time the server notices it .... there was talk
at one point of the kernel timestamping mouse events, but I don't
think it happens currently.

Regards,
					Owen
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.