[Xcb] Interning multiple atoms w/ one function call (alla XInternAtoms)

Vincent Torri Vincent.Torri at iecn.u-nancy.fr
Thu Aug 11 07:43:42 EST 2005



On Wed, 10 Aug 2005, Jamey Sharp wrote:

> On Wed, 2005-08-10 at 06:30 +0200, Vincent Torri wrote:
> > On Tue, 9 Aug 2005, Jamey Sharp wrote:
> > > That said, I implemented exactly the function being asked for in the old
> > > XCL source; somebody could check it out of the xcl module in CVS if they
> > > wanted to.
> >
> > in this xcl function, why allocating memory (for cs) and doing 2 loops ?
> > That is, why not always doing something like in the case when the
> > allocation of cs fails ?
>
> Because the whole point of the XInternAtoms function is to not block on
> any of the replies until all of the requests have been made. The
> fallback code, when memory allocation fails, is very slow: it waits for
> N round-trips to the server, if N atoms are requested. The other code
> waits for 1 round-trip, no matter how many atoms are requested.

I understand that it is the interest of xcb with respect to xlib, but i
don't understand why there is an improvement. Maybe it's time for me to
understand more how theis stuff really works.

So, when the allocation fails, ok, I see why there are N round-trips.

But when it does not fail, there are N requests for the N atoms. Then we
ask for N replies. So we always ask N times the server. So i don't
understand the improvement.

Could you please detail a bit where I'm wrong ? This can help me in
improving ecore_xcb (and above all, using correctly xcb in ecore, which i
do not yet).

thank you

Vincent


More information about the xcb mailing list