Re: [Xcb] GTK-XCB is in progress(Profiling gtk-xcb vs gtk-x11)



On Wed, 2006-11-08 at 17:25 +0800, Yang JianJun wrote:
> Why I use xcb_no_operation in gdk-xcb:
> gdk-x11 maintain a window queue for windowing redraw. Each queue item
> has a serial, just the X request serial, which come from the
> NextRequest macro. gdk-x11 compare the serial of queue items to
> discard irrelevant ones, in order to keep length of queue finite if it
> grows too long. Instead of NextRequest, I just write a XCBNextRequest
> macro in gdk-xcb : 
>     #define XCBNextRequest(c)
> ((xcb_no_operation(c)).sequence + 1)
> So gdk-xcb send the xcb_no_operation_request frequently when window
> redraw occurs. Maybe this brings down the gdk-xcb's performance?
> Should I avoid using xcb_no_operation as much as possible? 
> 
> "This design choice causes XCBNoOperation to be something like a
> factor of four times slower than XNoOperation in the current
> implementation. Note that NoOperation, a completely useless request,
> suffers the most...", Jamey said (How XCB's design affects its
> performance, solair.livejournal.com). Is it still right now?

XNextRequest in libX11 is a pointer dereference and an increment, where
your XCBNextRequest is a round-trip.  There must be a better way than
this.

I see that the XLib/Xcb layer has a xcb_get_request_sent() function that
returns the latest sequence number sent.   Can this, or something
similar, be used instead?  Adding a round-trip when none is required
shouldn't be required.

Ross
-- 
Ross Burton                                 mail: ross burtonini com
                                          jabber: ross burtonini com
                                     www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]