Number of dynamically linked libraries (Was: Re: Gtk+4.0)

2016-06-22 Thread Sébastien Wilmet
On Tue, Jun 21, 2016 at 05:07:46PM +0100, Simon McVittie wrote:
> > 2. Add experimental features through external libraries (libsexy and so
> > on?)



> and linking a large number of tiny libraries has a measurable startup
> cost for applications.

https://blogs.gnome.org/alexl/2008/10/07/towards-a-ridley-based-platform/

"""
Before:

ldd `which nautilus` | wc -l
91

After:

ldd `which nautilus` | wc -l
60
"""

Now:

ldd `which nautilus` | wc -l
98

Time for another Project Ridley?

And it doesn't count the dlopen'ed libraries, like for the GIO extension
points.

--
Sébastien
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Number of dynamically linked libraries (Was: Re: Gtk+4.0)

2016-06-22 Thread Simon McVittie
On 22/06/16 13:14, Sébastien Wilmet wrote:
> Time for another Project Ridley?

Maybe; or maybe the benefit of those 30 extra libraries outweighs their
cost (CPUs are faster now than in the GNOME 2 days after all), but we
still shouldn't introduce more without good reasons.

If there is a compelling advantage to splitting up libraries, of course,
by all means do so.

> And it doesn't count the dlopen'ed libraries, like for the GIO extension
> points.

The application potentially has an opportunity to provide feedback to
the user before it loads all of those, at least.

"Properly linked" hard dependencies seem likely to be a bigger issue for
GUI responsiveness than dlopen'd modules and *their* dependencies,
because we can't display anything (not even an empty window) until ld.so
has finished thinking about the relocations for hard dependencies, and
handed over control to main().

-- 
Simon McVittie
Collabora Ltd. 

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Number of dynamically linked libraries (Was: Re: Gtk+4.0)

2016-06-22 Thread Bastien Nocera
On Wed, 2016-06-22 at 14:14 +0200, Sébastien Wilmet wrote:
> On Tue, Jun 21, 2016 at 05:07:46PM +0100, Simon McVittie wrote:
> > > 2. Add experimental features through external libraries (libsexy
> > > and so
> > > on?)
> 
> 
> 
> > and linking a large number of tiny libraries has a measurable
> > startup
> > cost for applications.
> 
> https://blogs.gnome.org/alexl/2008/10/07/towards-a-ridley-based-platf
> orm/
> 
> """
> Before:
> 
> ldd `which nautilus` | wc -l
> 91
> 
> After:
> 
> ldd `which nautilus` | wc -l
> 60
> """
> 
> Now:
> 
> ldd `which nautilus` | wc -l
> 98

Link it against gtk-3.0-wayland instead of both the x11 and wayland
versions, and try again? My nautilus links against 25 X libraries, both
the old-school versions and the xcb async versions. And to wayland libs
as well as Wayland.

> Time for another Project Ridley?

It's nearly 8 years later, and the costs of linking to all those
libraries is likely hidden by even the slowest of NANDs, eMMCs or SSD.
Even a stock GNOME install will have all those cached by the OS by the
time you get to launch nautilus.

There might be benefits to reducing the library count, but startup
speed isn't likely to be one.

> And it doesn't count the dlopen'ed libraries, like for the GIO
> extension
> points.
> 
> --
> Sébastien
> ___
> gtk-devel-list mailing list
> gtk-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-devel-list
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list