[Xcb] xcb-util: ewmh library

Barton C Massey bart at cs.pdx.edu
Fri May 22 11:23:22 PDT 2009

In message <sa5ab55s0rt.fsf at Orfeo.duckcorp.org> you wrote:
>     >  Just  remember that  latency,  not  bandwidth,  is the  important
>     > limiting  factor on X.  This  suggests that you  should create and
>     >  cache   all  the   EWMH  atoms  with   a  single   round-trip  at
>     > initialization  time.  Note that  the cookie magics [1]  should be
>     >  working for you  here; you  don't need  to force  the InternAtoms
>     > reply  and cache the result until  the first time you  need one of
>     > the atoms.
> Thanks for the link :). But well, at the moment the atoms
> (xcb_atom_t) are given as function arguments, therefore it
> makes the API a bit heavier but it is much flexible IMO
> because it allows program using this library to implement
> the cache in their own way (using hash map or whatever
> else) and usually it has already been done in the window
> manager using their own data structure. But well, as
> mentioned before it is not really convenient because it
> makes the API heavier, what do you think?

I think the EWMH atoms, which as far as I know are a small,
fixed set, should be interned at startup time and cached
internally by util/ewmh.  In addition to making the API
lighter, this will allow reducing latency for these atoms to
a single, probably hidden, round-trip.

Applications that want to do something magic with the atoms
would be welcome to cache them separately atop util/ewmh, or
just go under util/ewmh and make XCB calls.

Or am I missing something?


More information about the Xcb mailing list