Re: A cheap performance optimization



On Fre, 2005-01-07 at 11:18 -0500, Matthias Clasen wrote:
> On Sat, 2005-01-08 at 00:12 +0800, James Henstridge wrote:
> > Matthias Clasen wrote:
> > 
> > >One of the compiler people here at RedHat complained to me that most of
> > >Gnome is linked with --export-dynamic, which really bloats both the size
> > >and the load times (although prelink may alleviate that a bit). The ld
> > >documentation contains exact details about when --export-dynamic is
> > >needed, but it is never needed for libraries, and in most cases, it is
> > >not needed for apps either. 
> > >  
> > >
> > It is also worth noting that --export-dynamic breaks libtool's 
> > -export-symbols and -export-symbols-regex options, causing all symbols 
> > in a library to be exported.
> > 
> > >Currently, most of Gnome gets --export-dynamic from gmodule-2.0.pc,
> > >which is required by many libraries. Fortunately, with GLib 2.6, fixing
> > >this is as easy as requiring gmodule-no-export-2.0.pc instead of
> > >gmodule-2.0.pc. For completeness, I just added gmodule-export-2.0.pc as
> > >well.
> > >
> > >It would be a nice goal for Gnome 2.10 to replace all uses of
> > >gmodule-2.0.pc by either gmodule-no-export-2.0.pc or gmodule-
> > >export-2.0.pc (I guess the latter will be rarely needed).
> > >  
> > >
> > I'm not sure how much use the gmodule-no-export-2.0.pc file will be for 
> > applications using GTK, since gmodule-2.0 is a dependency of gtk+-2.0.pc 
> > (so "pkg-config --libs gtk+-2.0" includes --export-dynamic).
> > 
> 
> gtk 2.6 and pango 1.8 use gmodule-no-export-2.0.pc

$ grep gmodule *
gdk-pixbuf-2.0.pc:Requires: gobject-2.0,gmodule-2.0
gdk-pixbuf-xlib-2.0.pc:Requires: gobject-2.0,gmodule-2.0,gdk-pixbuf-2.0

That's from a gtk+ 2.6.0 installation.

Jürg

-- 
Jürg Billeter <j bitron ch>




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