Re: Snappy GUI response

David Jeske <[email protected]>
Newsgroups gmane.comp.xfree86.forum
Message-ID <20030706153215.U3060@mozart>
On Sun, Jul 06, 2003 at 05:34:05PM -0400, 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.

Hmm.. I'll try this, but I'm intentionally trying to include the time
from the mouse click until the UI is visible. It's supposed to be the
user-percieved time, and when the client-app receives the expose
event, nothing is visible so the user is certainly still waiting.

The reason I threw out that suggestion with the client message is that
if the server processes all events from my app in linear order, than I
I would know when it processed my ClientMessage it had completed all
drawing. The timing would be something like this:

A) app sends synthetic mouse click
B) server receives click and sends click
C) app receives click event and GTK does it's thing
D) event handler creates window
E) wm reparents window
F) app gets expose event and draws window
G) app sends ClientMessage "marker" to itself
H) server draws window contents
I) server parses ClientMessage request and sends it back to app
J) app receives client message and ends timing

If someone can confirm that a client message will definetly be handled
after drawing commands which were earlier in the request stream, that
would be great. Then I can time the end-to-end and just subtract one
server roundtrip time for the "A" and "J".

I'll also just try it and see what happens, but it would be good to
know what to expect without digging through Xfree sources.

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [email protected]
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.