[Xcb] [PATCH] Making XCB less of a memory hog

Jamey Sharp jamey at minilop.net
Sat May 12 18:34:26 PDT 2007


Hi Tilman!

Thanks for looking for performance and memory improvements to XCB! But
I'm not sure this is quite the win you think it is. If I'm wrong, let's
look at a patch adding a new function replacing xcb_send_request,
because you're right that we can't accept API or ABI changes at this
point. (Mike Haertel has me convinced we'll need to replace this
function to get substantial performance improvements anyway, but that's
another discussion.)

On Fri, May 11, 2007 at 05:16:43PM +0200, Tilman Sauerbeck wrote:
> So, in short, this patch reduces the memory that XCB eats at runtime,

GLX is the extension with the most requests, and even it has less than
one page of data. As far as I can tell, all DSOs have at least one page
of non-shared data due to, for example, the global offset table. In fact
every XCB extension needs a writable page to hold the xcb_extension_t
structure, even without a GOT.

Does your patch actually reduce the non-shared memory usage of the XCB
libraries at all?

> and it reduces the load time for the libraries.

That's obviously true, but on the other hand it makes the run-time
performance worse. I introduced the structure rather than passing those
values directly as arguments because at some point I measured a run-time
performance improvement by doing so (and because they really are
constant).

I can't believe a few hundred word stores at program start-up is so much
that we should make every X request more expensive... Is there something
wrong with my reasoning?

--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/c7085c5b/attachment.pgp 


More information about the Xcb mailing list