Re: Cost of extra libraries



* Owen Taylor <otaylor redhat com> [2004-04-12 12:04:12 -0400]:

Hi,

> You might want to investigate the performance implications of extra
> modules for ELF shared object ... the most common object file format 
> on systems where GLib is used. (Linux, Solaris, FreeBSD, etc.)
No, misunderstanding.

"Library" does not necessarily mean "shared object".

Okay, lets use the word "module" for that, to make the decision
more clear.

For me a module is a bunch of code, which provides some distinct
functionality with a certain interface ...
A module can exist in several forms, i.e. .a + includes, .so + includes,
part of some other .so, just some includes (as intrinsics or macros), ...

It should be the job of the buildsystem to find out, where to find 
a certain module (i.e which .so file to link) and it's also the job
of the buildsystem to provide the user/packager an easy-to-use interface
to specify how modules are grouped to shared object files.

> A symbol resolution is essentially a hash table lookup *per* shared
> library, so adding entry code to a shared library doesn't increase the
> cost of looking up symbols, but adding extra libraries does. 
Well, In my view of modules/libraries, dynamic linking is not necessarily
a need. Modules are linked together to shared objects or executables. 
If you decide to group all glib modules together w/ your application 
module then you dont need to link anything dynamically. That's what 
people tend to call static linking.

> And modern operating systems will generally be able to keep unused
> code from being loaded at all.
Okay, but that requires that these parts live in separate pages.
To come back to my view of "modules" - the buildsystem would probably 
arrange the code of several modules in a way which provides this.

But this only helps for runtime. A large lib - even only some few 
pages loaded - still pollutes you filesystem. This is very ugly 
for embedded systems.


cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT services

  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     contact metux de
  cellphone: +49 174 7066481
---------------------------------------------------------------------
   -- DSL-Zugang ab 0 Euro. -- statische IP -- UUCP -- Hosting --
---------------------------------------------------------------------



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