[Xcb] Integrating XCB with X11 and the memory footprint

Barton C Massey bart at cs.pdx.edu
Sat Jul 29 09:40:55 PDT 2006


Thanks much for the comments and suggestions!

The decision to factor the XCB suite so finely was actually
pretty carefully considered.  We understood the performance
penalties of doing things this way (which were actually
larger at the time we made this decision).

However, we regard the problems with large collections of
small libraries as a bug of the dynamic loading system, and
hope to fix it there rather than by distorting our
architecture.  Further, we hope that applications will move
away from Xlib to XCB, at which point many of the library
dependencies induced by the Xlib "kitchen sink" should
disappear. In addition, since the total XCB suite memory
footprint is around 100KB, and Xlib's is easily five times
that, we don't think the extra 20 pages or so are a huge
deal.

Okay, I'm fibbing a little. :-) Actually, we may re-merge a
lot of the commonly-used extension libraries at some point.
I suspect that a typical XCB-only application footprint will
end up being about 5 libraries, which is a lot more
reasonable than the current situation.

I should also mention that these are just my opinions,
although I *think* they are shared by the rest of the XCB
team.  I'm sure they'll loudly shout me down if they think
I've got it wrong somehow. :-)

Again, thanks much for your interest in XCB!  We'd love to
have you help us out with it; please let us know if you have
any interest in doing so.

(BTW, I had no idea that current Xlib top-of-tree is now
Xlib/XCB-enabled.  Thanks much for that info also!)

    Bart Massey
    bart at cs.pdx.edu


In message <8bd748e80607290754l12fae049u80aec8a70f25f2b0 at mail.gmail.com> you wrote:
> hi
> 
>         i just compiled libX11 and discovered that now it depends on XCB, no
>         problem, i donwloaded it from the GIT repository and compiled it.
> 
>         After doing so i tried to see what it had installed, i discovered a new
>         world of 20 very small libraries (the biggest being libXCB.so.0.0.0
>         which is 62K).
> 
>         The problem with of these small libraries is that when each of them are
>         loaded the dynamic linking requires one full page for the symbol tables,
>         this page cannot be shared between processes, thus increasing the memory
>         that each process using X11 libraries requires.
> 
>         See this thread on gnome performance for more information:
>          http://article.gmane.org/gmane.comp.gnome.performance/263/match=gthread
> 
>         Now that there is still time, i think that it would be a neat idea to
>         merge some of these libraries so that the impact on overall memory
>         pressure this change would bring. Having a very modular system is a
>         loable purpose, but a small memory footprint should also be kept in mind
>         when doing so, I guess that some of these libraries are going to be used
>         together always (or most of the times), thus i think they could be
>         merged into a single library.
> 
>         This email is just my two cents, take it with a grain of salt as i'm no
>         expert in this topic. However if this email makes the X11 and XCB
>         authors consider and investigate into this issue my goal would have been
>         achieved.
> 
>         Thanks a lot for your marvellous work,
> 
>         Diego González
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb


More information about the Xcb mailing list