[Xcb] splitting xcb/util

Julien Danjou julien at danjou.info
Fri Jun 25 01:17:27 PDT 2010


On Fri, Jun 25 2010, Jamey Sharp wrote:

> I always intended to implement a cache for InternAtom/GetAtomName
> queries, like the one Xlib provides. xcb_atom_get_fast* was supposed
> to search the predefined table first, the general cache second, and
> finally issue a request if the first two missed. I still think that's
> a potentially useful feature, though mostly for specialized apps like
> xprop. Most toolkits and applications know at compile time what atoms
> they'll need, and can refer to the predefined atom constants or, like
> xcb-ewmh, can explicitly cache a known list of atoms.

This is what I wanted to say. Except from some EWMH atoms whose names
are based on screen number, almost all atoms we use in awesome are known
at compile time.  This mean we can send a bunch of atom request at
start-up, and get the reply whenever we need (actually we do it at
start-up too ;-)).

And we even cache IIRC the dynamically named ones. So I don't think
there's a need to have library to cache. Having a cache needs looking
into some sort of hash-table; in awesome we just store atoms in global
variables, like Xlib and XCB does for predefined atoms. That's just
simpler and does not require any cache. :-)

> The reply library is gone, of course, but I agree: What's left of
> event should be merged with aux, and probably atom, into one new
> library. I think "xcb-util" would be a sensible name for the new
> library, but I don't care.

Agreed.

> I won't have reliable Internet access for the next three weeks, so
> don't count on much feedback from me during that time. Perhaps
> xcb-util will be all split up nicely by the time I get back? :-)

Last time I saw Arnaud, he told me he was trying to work on it but have
little spare time unfortunately.

-- 
Julien Danjou
// ᐰ <julien at danjou.info>   http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20100625/85556213/attachment.pgp>


More information about the Xcb mailing list