[Xcb] Interning multiple atoms w/ one function call (alla
XInternAtoms)
Vincent Torri
Vincent.Torri at iecn.u-nancy.fr
Wed Aug 10 14:30:33 EST 2005
On Tue, 9 Aug 2005, Jamey Sharp wrote:
> On Tue, 2005-08-09 at 12:04 -0700, Carl Worth wrote:
> > On Tue, 09 Aug 2005 10:32:03 -0700, Barton C Massey wrote:
> > > It should go in somewhere. If it's a performance
> > > optimization, it should go in libXCBAtom. If it just
> > > effectively calls XInternAtom a bunch of times, it should go
> > > in libXCBAux.
> >
> > Isn't XInternAtoms one of the things that is an essential
> > round-trip-killing lifesaver for Xlib, but would just be a trivial
> > wrapper for XCB ?
> >
> > That is, the one-function-call nature of XInternAtoms isn't the
> > significant bit, but rather its one-round-trip nature. But doesn't
> > XCB's atom code allow the round-trip latency to be completely hidden
> > even with lots of individual function calls/requests to intern each
> > atom?
> >
> > The wrapper would obviously be useful for aiding porting of code of
> > course.
>
> Yup, all that is exactly right. Actually given the simplicity of writing
> one for-loop to issue all the InternAtom requests, and then another to
> get all the replies, it's not obvious to me that a new function is a win
> here, even for porters.
>
> 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 ?
Vincent
More information about the xcb
mailing list