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

Tilman Sauerbeck tilman at code-monkey.de
Sun May 13 02:42:26 PDT 2007


Jamey Sharp [2007-05-12 18:34]:

Hi Jamey,
I suck. This will teach me to come up with hard evidence before
submitting invasive patches :|

> 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

It probably isn't.

> 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.

You're right. The patch reduces the size of the data section from 2612
bytes to 296 bytes, but since it never was larger than one page anyway,
this probably doesn't have any effect at all.

So this patch will only help if there's ~350+ requests in a single
library.

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

Probably not.

> > 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).

Interesting. Is there a benchmark available that I can use to compare
the runtime performance?

Regards,
Tilman

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xcb/attachments/20070513/70e53c8f/attachment.pgp 


More information about the Xcb mailing list