Re: On the cost of libraries
- From: Maciej Stachowiak <mjs noisehavoc org>
- To: Alex Larsson <alexl redhat com>
- Cc: gnome-hackers gnome org
- Subject: Re: On the cost of libraries
- Date: Sat, 1 Sep 2001 15:14:22 -0700
On 01Sep2001 05:09PM (-0400), Alex Larsson wrote:
>
> No app will use all the symbols in the library though, and the
> measurements I made are worst case (all symbols are found in the last
> library). In reality most symbols referenced are probably in the lower
> layers (fan-out effect as higher level functions call lower lever), and
> lower level libraries are (hopefully) linked earlier.
>
Actually, lower-level libraries are typically later on the link line
so they can resolve symbols in the higher-level libraries.
> Note that this only discussed one aspect of libraries, the splitting
> libraries aspect. Libraries do have other costs too, such as paging in
> code and fixups. Most of the fixup cost can be fixed by using ELF
> prelinking, and page-in costs could be lowered with a grope-like tool.
So how come prelinking doesn't help with the symbol lookup cost? You
would think a prelinked binary could know what symbol is in what
shared library, and at what offset, assuming none of the libraries
have changed since the prelinking was done.
> To summarize, I think our current model is good and adding libraries
> is not a huge problem for us, although I would recommend against random
> splitting of libraries (i.e. the 10 guppy libraries linked to by gnucash
> might serve as a bad example).
Thanks for actually running the numbers. This has been realy helpful.
- Maciej
_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]