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

Re: Bash is a monstor (was: ITP: lukemftp)

On Mon, 8 Nov 1999, Edward Betts wrote:

> Herbert Xu <herbert@gondor.apana.org.au> wrote:
> > Joseph Carter <knghtbrd@debian.org> wrote:
> > >
> > > You know that ash is part of what is now under the new BSD license and can
> > > now be linked with readline?  And there's even a patch floating around for
> > > the purpose.
> > 
> > Indeed, there's even a small patch around that supports history in ash without
> > libedit/libreadline.  I have not included it in the ash package because at
> > the moment it is not trying to be an interactive shell.
> Bash is a monster, each copy uses about 1Mb of memory. I have already set all
> my gettys to mingetty, which saves some RAM. I would like to move to using a
> smaller shell like ash. I understand what you are saying about a small ash for
> scripts on boot disks and the like. I could suggest two ash packages, but it
> is probably a bit OTT.



On most typical applications/systems, there are several instances of a
given shell running. In this case almost all of the memory is shared
between them, and so takes up no more space than one copy.

So the gain of bash over ash in this department is minimal.

Add to that that you are very likely to have over things using readline on
your computer, and that memory (the lib-readline resident size) is shared
between them too.

The main gain of ash over bash is (arguably) stricter posix linting, and
(more importantly) quicker start-up time, leading to faster execution of
large numbers of small scripts (typical at system startup, for example).

|  Jelibean aka  | jules@jellybean.co.uk         |  6 Evelyn Rd	       |
|  Jules aka     | jules@debian.org              |  Richmond, Surrey   |
|  Julian Bean   | jmlb2@hermes.cam.ac.uk        |  TW9 2TF *UK*       |
|  War doesn't demonstrate who's right... just who's left.             |
|  When privacy is outlawed... only the outlaws have privacy.          |

Reply to: