maximising code sharing

Rob Landley rob at landley.net
Tue Jan 16 18:09:41 UTC 2007


On Monday 15 January 2007 12:35 pm, Rogelio Serrano wrote:
> This is what im really concerned about. I dont think we can put the
> entire desktop system in busybox. We cant have mozilla and x and ion3
> and everything else in there right?

Can, probably.  Should: no way.

> > Since shared libs also have a runtime cost (not huge but not
> > insignificant) you should consider whether they will benefit you or not.
> >
> 
> I dont know about the performance hit but the primary concern is small
> footprint.

Oh the runtime footprint of shared linking is a rounding error, and it's only 
incurred at fork time.  (The real overhead is the extra page allocations, 
everything else happens in cache and is a form of prefaulting that can give 
you better disk locality and thus actually speed up the first exec in certain 
situations, although readahead will probably do that for you anyway these 
days.)

Modern runtime performance analysis is mostly about cache population behavior 
at various levels (at least when locking isn't involved).  Yeah, there's 
tight inner CPU intensive loops, but they come up less often than you'd 
think. :)

> Im working with a unified tree similar to BSD and sharing everything
> is very tempting for lazy programmers like me.

Why do you think libbb exists?

Rob
-- 
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery



More information about the busybox mailing list