Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jun 2010 21:31:32 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
Cc:        stefan@fafoe.narf.at, gcooper@FreeBSD.org, jilles@stack.nl, freebsd-arch@FreeBSD.org
Subject:   Re: Further sh(1) plans
Message-ID:  <20100623204143.N45440@delplex.bde.org>
In-Reply-To: <86r5jy3m6l.fsf@ds4.des.no>
References:  <86wrtte830.fsf@ds4.des.no> <20100622.102058.69891821692792062.imp@bsdimp.com> <86d3vi53b9.fsf@ds4.des.no> <20100622.131232.1004138037621847577.imp@bsdimp.com> <86r5jy3m6l.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-1364095537-1277292692=:45440
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Tue, 22 Jun 2010, [utf-8] Dag-Erling Sm=C3=B8rgrav wrote:

> "M. Warner Losh" <imp@bsdimp.com> writes:
>> Dag-Erling Sm=C3=B8rgrav <des@des.no> writes:
>> "M. Warner Losh" <imp@bsdimp.com> writes:
>>>> ~4k isn't worth a fuss.  However, ~315k from libncurses and ~110k from
>>>> libedit is,

They aren't quite that bad.  More like 220K for both of them combined
(static bloat of text size; their shared library and/or memory footprint
may be worse).  This is up from 180K in RELENG_5 and IIRC 150K in
RELENG_4.  "optimizing" these libraries by compiling them with -O2
cannot help.

220K is still disgusting, since it is more than twice the size of the
whole stripped file /bin/sh (90K) in FreeBSD-1.  (I have to use the
file size for comparison with old binaries since `size' is broken on
aout format.)

The file size in FreeBSD-2 was only 270K IIRC.  This was with aout and
its extra padding, and with libedit and possible /etc/passwd support,
and even with builtin printf, so it had more features than now!

Omitting /etc/passwd support (just 1 getpwnam() call) as well as history
reduces the text size by another 350K.  Its file size, for essentially
the same features as the FreeBSD-1 sh, is 285K (the full reduction is
from 1059K, giving a total reduction of 774K).  (I have to use the
file size for comparison since `size' is broken on aout format.)  In
FreeBSD-5, the reduction is to 170K.  malloc() is responsible for many
of the extra 115K.

>>> Oh come on, they were there already.  Don't blame tab completion for
>>> this.
>> They weren't there before.  Guess I missed when they went in.
>
> Time flies when you're having fun...

Not too much fun to watch the bloat.  I notice it more since I use static
linkage for everything except ports.  A 64MB root partition is barely
large enough for static everything and 6 kernels.

Bruce
--0-1364095537-1277292692=:45440--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100623204143.N45440>