Re: On the cost of libraries



On 2 Sep 2001, Ulrich Drepper wrote:

> - ordering the DSO content will get important.  We are working on tools
>   to make this easier to do but again here the code design is essential.
>   The reordering can happen at best on ELF section level, maybe only
>   at object file level.  I.e., code which use large source files which
>   define many functions will not be able to take advantage of this.  One
>   might use gcc's -ffunction-sections option but this is no real substitute
>   for a clean design since handling of static functions is left up to the
>   tool doing the reorganization.
> 

reordering functions is definately possible, except to do it you first
need data based on which to do the re-ordering. I'm not entirely sure how
to get a representative dataset for many of the present libararies. One
way or the other, it would be a large excercise and probably not worth the
time spent (comparatively speaking - bugfixing is way more important that
dabbling in esoteric minor perfomance improving magic).

> - made easy by the first point above: explicitly use dlopen() to load
>   DSO.  This is lazy loading implemented correctly.  The application
>   controls when another DSO is needed.  By using callbacks the amount
>   of work needed to use the newly loaded DSO is minimal: just call the
>   function to get the callbacks.  Note how easy it is to just fill in
>   the callback structure with pointers to functions which load the DSO
>   if necessary.

Yes, this works very well for all kinds of plugins and similar, but not
really for platform libraries. 

> 
> -- 
> ---------------.                          ,-.   1325 Chesapeake Terrace
> Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
> Red Hat          `--' drepper at redhat.com   `------------------------
> 

	Sander

I haven't been vampired. You've been Weatherwaxed.



_______________________________________________
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]