[Xcb] [PATCH] Reduce memory footprint of xcb-atom

Jamey Sharp jamey at minilop.net
Sat May 12 23:38:29 PDT 2007


On Fri, May 11, 2007 at 06:16:25PM +0200, Tilman Sauerbeck wrote:
> the attached patch reduces the memory footprint of libxcb-atom.so,

Just to nit-pick: I believe libxcb-atom.so needs just as many memory
pages as it did before. But the changes in `size` output are very nice.

> and the number of relocations that have to be performed on load.

At the cost of one extra ALU instruction in get_atom_name_predefined?
I'm sold! I cleaned up your patch a tiny bit, and I've committed and
pushed it. Thanks.

I was thinking of suggesting that you optimize it further by finding
strings that are tail-subsets of other strings and overlapping them. But
then I found that no built-in atom name is a tail-subset of any other.
How disappointing.

However, if you could get gperf to use the string pool you've just built
rather than building its own, you'd save even more memory--almost enough
to drop a page from the consumption of the library. Things to think
about.

--Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20070512/acb6b6e9/attachment.pgp 


More information about the Xcb mailing list