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

Re: busybox bloat



On Mon Sep 03, 2001 at 01:47:47AM -0800, Ethan Benson wrote:
> On Sun, Sep 02, 2001 at 11:48:13PM -0600, Erik Andersen wrote:
> > > removing ar along i imagine would not gain very much, but then again
> > > we need every byte we can get.
> > 
> > For the current set of busybox applets, I've made a best guess as 
> > to what is likely to be needed.  If somone can find some applets 
> > that are unused, I'm more then happy to axe them.
> 
> see my patch, yes, basename, and dirname are in use by debootstrap,
> but i think its not unreasonable to change debootstrap to not use
> them.  especially dirname and basename, those are such trivial shell
> substitutions.  
> 
> BASENAME="${somevar##*/}"
> DIRNAME="${somevar%/*}"

Ok.  But keep in mind that you will not get as much from having these
disabled as you might think.  The heavy lifting for basename(1) is done
by a get_last_path_component() function, which is also used by cp,
mv, ln, rm, init, wget, etc...

The heavy lifting for dirname(1) is done by dirname(3), which in the case
of the boot floppies is part of the C library.

I just did a quick check -- disabling both dirname and basename will
save exactly 256 bytes on x86.  Worth it?


Here is something perhaps much more interesting:  lazybox lists 'vi' 
as nonexistant, yet the busybox .deb (which is what is used for the 
boot-floppies) is enabling this applet.  Disabling 'vi' will save
24.3k on x86 (at the cost of losing the One True Editor ;)

Thoughts?

> but has anyone actually done any regression testing of posix shell
> scripts on it? 

just the regression tests that we have written ourself for busybox.
Do you have/know of any comprehensive posix shell test scripts?

 -Erik

--
Erik B. Andersen   email:  andersee@debian.org, andersen@lineo.com
--This message was written using 73% post-consumer electrons--

Attachment: pgpE2Q4cmkTOh.pgp
Description: PGP signature


Reply to: