Lots of libraries ...

Hi there,

On Thu, 2009-11-26 at 14:35 +0100, Alexander Larsson wrote:
> I think that we are now at a place where its used widely enough and
> is important enough that we need to be able to rely on the basic
> threading primitives in our libraries and plugins by default. It
> would be nice to be able to drop the whole thread initialization
> issue for Gnome 3.0.

	Since we made the right choice here :-) I was wondering if (with the
Gnome 3.0 flag-day) we could drop some of the smattering of little
libraries we have around the place[1].

	If threading is enabled by default; is there any reason to continue to
have a separate libgthread ? how about a separate libgmodule ?

	On my system, I have[2] 40 processes linking gmodule - chewing 160k (a
4K page each[3]) - that is 10x more than the 14k that is libgmodule.
Similarly 41 processes link gthread (at only 18k of .so)

	Even if the plan is to not break glib ABI for 3.0 - perhaps we can
achieve some unification here without breaking ABI.

	Could we -statically- link libgthread + libgmodule into libglib and
libgdk + libgdk-pixbuf into libgtk libraries respectively[4] - such that
people no longer had to link to lots of scattered libraries via their
pkg-config files ? Of course, if old apps still did that the run-time
linker would do the right thing (TM) with it's 2x g_module_opens and 2x
g_thread_inits and so on.

	The down-side might be link-time errors for people with pkg-config
files out of step with their installed libraries, but ... you can't
please everyone.

	Or am I way into the deep grass ?



PS. is it only my libunique that links a handful of X extensions it is
unlikely to need ?

[1] - Of course I understand for every good deed here, the X team
destroy the benefit with a ten-fold library fragmentation but, we can
but try ?
[2] - cd /proc; for a in [123456789]*; do grep -c \
         'gmodule' /proc/$a/maps; done 2>&1 | grep -v '^0$' | wc -l
[3] - pre-linking is a hair-ball ;-)
[4] - presumably since they would both be libraries this would have no
nasty -fPIC related autotools ramifications either
 michael meeks novell com  <><, Pseudo Engineer, itinerant idiot

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]