zsh-workers
 help / color / mirror / code / Atom feed
* Re: zsh bloat?
@ 2000-07-21  7:31 Sven Wischnowsky
  0 siblings, 0 replies; 5+ messages in thread
From: Sven Wischnowsky @ 2000-07-21  7:31 UTC (permalink / raw)
  To: zsh-workers


Zefram wrote:

> ...
> 
> So that's 342kB of main binary, 655kB of loadable modules, and 933kB of
> shell functions. 

Hey, not fair ;-) Some of the modules do things not comparable to
anything bash can do.

On my machine zsh is still smaller than a 2.01.1(1) bash, even though
I linked most modules into it (at least everything needed for zle and
completion).

> (Wow, I didn't realise we had so many functions -- the
> current tarballs are now more than twice the size of the 3.1.5 tarball.)

In memory, functions can be smaller than their definition files. Let's 
see. Compiling all the functions in Functions/[PZ]* and all the
completion functions gives me a .zwc file with 1385664 bytes. That
contains two versions (for either endianess), so if you use all
functions you need 692832 bytes plus some padding and the function
structs. But the former can be taken from a shared mapped zwc file, so 
it isn't that bad, I think.

However, at least one intention I had with this new completion system
was to make the main shell smaller. And I think we will make even more
progress in that direction (zle, probably moving more of the basic
completion code from C to shell code, etc).

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: zsh bloat?
  2000-07-20 21:43 ` Ollivier Robert
@ 2000-07-20 23:51   ` R Joseph Wright
  0 siblings, 0 replies; 5+ messages in thread
From: R Joseph Wright @ 2000-07-20 23:51 UTC (permalink / raw)
  To: Ollivier Robert; +Cc: zsh-workers

On Thu, Jul 20, 2000 at 11:43:06PM +0200, Ollivier Robert wrote:
> According to R Joseph Wright:
> > I'm running FreeBSD, which comes by default with sh and tcsh.  Here I compare
> > it to those two, and some others:
> 
> Beware, you're comparing Apples and Oranges there because everything inside
> /bin is statically linked...
> 
> static:
> > 440	/bin/sh
> > 592	/bin/tcsh
> 
> dynamic:
> > 736	/usr/local/bin/bash     maybe not stripped ?
> > 328	/usr/local/bin/ksh
> > 352	/usr/local/bin/zsh
> 
> Now, if you look at zsh on a 5.0-CURRENT system:
> 
> -rwxr-xr-x  2 root  wheel  5120 Jul  3 14:52 /usr/local/bin/zsh
> 
> Hmmm, nicely small :-) :-)
> 
> However:
> 
> /usr/local/bin/zsh:
> 	libzsh-3.1.9-dev-2.so => /usr/local/lib/zsh/libzsh-3.1.9-dev-2.so (0x28064000)
> 	libncurses.so.5 => /usr/lib/libncurses.so.5 (0x280cd000)
> 	libm.so.2 => /usr/lib/libm.so.2 (0x2810e000)
> 	libc.so.4 => /usr/lib/libc.so.4 (0x28129000)
> 
> and
> 
> -rwxr-xr-x  1 root  wheel  404176 Jul  3 14:52 /usr/local/lib/zsh/libzsh-3.1.9-dev-2.so
> 
> And don't forget the modules:
> 
> total 552
> -rwxr-xr-x  1 root  wheel    3156 Jul  3 14:52 cap.so
> -rwxr-xr-x  1 root  wheel    5040 Jul  3 14:52 clone.so
> -rwxr-xr-x  1 root  wheel   51252 Jul  3 14:52 compctl.so
> -rwxr-xr-x  1 root  wheel   96196 Jul  3 14:52 complete.so
> -rwxr-xr-x  1 root  wheel   33812 Jul  3 14:52 complist.so
> -rwxr-xr-x  1 root  wheel   40052 Jul  3 14:52 computil.so
> -rwxr-xr-x  1 root  wheel    4060 Jul  3 14:52 deltochar.so
> -rwxr-xr-x  1 root  wheel    7148 Jul  3 14:52 example.so
> -rwxr-xr-x  1 root  wheel   12268 Jul  3 14:52 files.so
> -rwxr-xr-x  1 root  wheel    6080 Jul  3 14:52 mapfile.so
> -rwxr-xr-x  1 root  wheel   10236 Jul  3 14:52 mathfunc.so
> -rwxr-xr-x  1 root  wheel   23976 Jul  3 14:52 parameter.so
> -rwxr-xr-x  1 root  wheel    9032 Jul  3 14:52 rlimits.so
> -rwxr-xr-x  1 root  wheel    5148 Jul  3 14:52 sched.so
> -rwxr-xr-x  1 root  wheel    9656 Jul  3 14:52 stat.so
> -rwxr-xr-x  1 root  wheel   30996 Jul  3 14:52 zftp.so
> -rwxr-xr-x  1 root  wheel  159676 Jul  3 14:52 zle.so
> -rwxr-xr-x  1 root  wheel    5340 Jul  3 14:52 zleparameter.so
> -rwxr-xr-x  1 root  wheel    6264 Jul  3 14:52 zprof.so
> -rwxr-xr-x  1 root  wheel   10060 Jul  3 14:52 zpty.so
> -rwxr-xr-x  1 root  wheel   20284 Jul  3 14:52 zutil.so
> 
> Something is sure, zsh is getting bigger, both in disk space and memory
> footprint with every version. I still think it is worth it although
> sometimes I'd like to see it getting smaller.
> 
> I won't go back to tcsh.
> 
> An older static zsh:
> 
> -rwxr-xr-x  1 root  wheel  639396 Sep 27  1999 /sbin/zsh
> 
> -- 
> Ollivier ROBERT -=- Eurocontrol EEC/ITM -=- roberto@eurocontrol.fr
> The Postman hits! The Postman hits! You have new mail.

When I look at /var/db/pkg/zsh-3.0.8/+CONTENTS, I see the zsh port only
installs these files:

/usr/local/man/man1/zsh.1.gz
/usr/local/man/man1/zshbuiltins.1.gz
/usr/local/man/man1/zshcompctl.1.gz
/usr/local/man/man1/zshexpn.1.gz
/usr/local/man/man1/zshmisc.1.gz
/usr/local/man/man1/zshoptions.1.gz
/usr/local/man/man1/zshall.1.gz
/usr/local/man/man1/zshparam.1.gz
/usr/local/man/man1/zshzle.1.gz
/usr/local/bin/zsh
/usr/local/bin/zsh-3.0.8 		This is hard linked to /usr/local/bin/zsh
/usr/local/info/zsh.info

Where are the libraries and modules?  They don't seem to exist on my system,
yet I still have a feature packed shell.

Maybe it's because I'm using an older version.  I just downloaded the source
tarball for 3.1.9 and it's more than twice the size of the tarball for
3.0.8, plus there's a separate tarball for functions.  What happened between
then and now?  

3.0.8 has way more interactive features than I will ever
use.  It's good enough for me :).


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: zsh bloat?
  2000-07-20 21:26 R Joseph Wright
  2000-07-20 21:43 ` Ollivier Robert
@ 2000-07-20 21:46 ` Zefram
  1 sibling, 0 replies; 5+ messages in thread
From: Zefram @ 2000-07-20 21:46 UTC (permalink / raw)
  To: R Joseph Wright; +Cc: zsh-workers

R Joseph Wright wrote:
>Zsh shows itself to be smaller than all the others, with the exception of
>ksh, and vastly smaller than bash.  Unless I am missing something, zsh
>seems quite the opposite of bloat.  With all its awesome features, how can 
>it be done?

A lot of zsh's features are not in the main executable, but are now
in separate code modules or shell functions.  Quick check on my laptop
(Red Hat):

$ du -s /opt/zsh/* /bin/ash /bin/bash /bin/tcsh /bin/ksh
342     /opt/zsh/bin
655     /opt/zsh/lib
724     /opt/zsh/man
933     /opt/zsh/share
1858    /opt/zsh/src
63      /bin/ash
313     /bin/bash
253     /bin/tcsh
160     /bin/ksh

So that's 342kB of main binary, 655kB of loadable modules, and 933kB of
shell functions.  (Wow, I didn't realise we had so many functions -- the
current tarballs are now more than twice the size of the 3.1.5 tarball.)
Depending on how you count it, zsh is the largest shell by a factor of
1.1, 3.2 or 6.2.  Of course, in any particular running instance of zsh,
most of those modules and shell functions won't be loaded.  zsh can
also reasonably be installed without any of these extras, making it a
competitively small shell, but with no great interactive features.

-zefram


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: zsh bloat?
  2000-07-20 21:26 R Joseph Wright
@ 2000-07-20 21:43 ` Ollivier Robert
  2000-07-20 23:51   ` R Joseph Wright
  2000-07-20 21:46 ` Zefram
  1 sibling, 1 reply; 5+ messages in thread
From: Ollivier Robert @ 2000-07-20 21:43 UTC (permalink / raw)
  To: zsh-workers; +Cc: R Joseph Wright

According to R Joseph Wright:
> I'm running FreeBSD, which comes by default with sh and tcsh.  Here I compare
> it to those two, and some others:

Beware, you're comparing Apples and Oranges there because everything inside
/bin is statically linked...

static:
> 440	/bin/sh
> 592	/bin/tcsh

dynamic:
> 736	/usr/local/bin/bash     maybe not stripped ?
> 328	/usr/local/bin/ksh
> 352	/usr/local/bin/zsh

Now, if you look at zsh on a 5.0-CURRENT system:

-rwxr-xr-x  2 root  wheel  5120 Jul  3 14:52 /usr/local/bin/zsh

Hmmm, nicely small :-) :-)

However:

/usr/local/bin/zsh:
	libzsh-3.1.9-dev-2.so => /usr/local/lib/zsh/libzsh-3.1.9-dev-2.so (0x28064000)
	libncurses.so.5 => /usr/lib/libncurses.so.5 (0x280cd000)
	libm.so.2 => /usr/lib/libm.so.2 (0x2810e000)
	libc.so.4 => /usr/lib/libc.so.4 (0x28129000)

and

-rwxr-xr-x  1 root  wheel  404176 Jul  3 14:52 /usr/local/lib/zsh/libzsh-3.1.9-dev-2.so

And don't forget the modules:

total 552
-rwxr-xr-x  1 root  wheel    3156 Jul  3 14:52 cap.so
-rwxr-xr-x  1 root  wheel    5040 Jul  3 14:52 clone.so
-rwxr-xr-x  1 root  wheel   51252 Jul  3 14:52 compctl.so
-rwxr-xr-x  1 root  wheel   96196 Jul  3 14:52 complete.so
-rwxr-xr-x  1 root  wheel   33812 Jul  3 14:52 complist.so
-rwxr-xr-x  1 root  wheel   40052 Jul  3 14:52 computil.so
-rwxr-xr-x  1 root  wheel    4060 Jul  3 14:52 deltochar.so
-rwxr-xr-x  1 root  wheel    7148 Jul  3 14:52 example.so
-rwxr-xr-x  1 root  wheel   12268 Jul  3 14:52 files.so
-rwxr-xr-x  1 root  wheel    6080 Jul  3 14:52 mapfile.so
-rwxr-xr-x  1 root  wheel   10236 Jul  3 14:52 mathfunc.so
-rwxr-xr-x  1 root  wheel   23976 Jul  3 14:52 parameter.so
-rwxr-xr-x  1 root  wheel    9032 Jul  3 14:52 rlimits.so
-rwxr-xr-x  1 root  wheel    5148 Jul  3 14:52 sched.so
-rwxr-xr-x  1 root  wheel    9656 Jul  3 14:52 stat.so
-rwxr-xr-x  1 root  wheel   30996 Jul  3 14:52 zftp.so
-rwxr-xr-x  1 root  wheel  159676 Jul  3 14:52 zle.so
-rwxr-xr-x  1 root  wheel    5340 Jul  3 14:52 zleparameter.so
-rwxr-xr-x  1 root  wheel    6264 Jul  3 14:52 zprof.so
-rwxr-xr-x  1 root  wheel   10060 Jul  3 14:52 zpty.so
-rwxr-xr-x  1 root  wheel   20284 Jul  3 14:52 zutil.so

Something is sure, zsh is getting bigger, both in disk space and memory
footprint with every version. I still think it is worth it although
sometimes I'd like to see it getting smaller.

I won't go back to tcsh.

An older static zsh:

-rwxr-xr-x  1 root  wheel  639396 Sep 27  1999 /sbin/zsh

-- 
Ollivier ROBERT -=- Eurocontrol EEC/ITM -=- roberto@eurocontrol.fr
The Postman hits! The Postman hits! You have new mail.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* zsh bloat?
@ 2000-07-20 21:26 R Joseph Wright
  2000-07-20 21:43 ` Ollivier Robert
  2000-07-20 21:46 ` Zefram
  0 siblings, 2 replies; 5+ messages in thread
From: R Joseph Wright @ 2000-07-20 21:26 UTC (permalink / raw)
  To: zsh-workers

I just installed zsh and am very impressed by its configurability and speed.
In a number of different places I've seeen references to zsh being bloated,
one person on slashdot claimed it to be more bloated than bash.  Even on the
online documentation there are a few references to it not being "small".
 
I'm running FreeBSD, which comes by default with sh and tcsh.  Here I compare
it to those two, and some others:
 
% du /bin/sh /bin/tcsh /usr/local/bin/bash /usr/local/bin/ksh /usr/local/bin/zsh
 
440	/bin/sh
592	/bin/tcsh
736	/usr/local/bin/bash
328	/usr/local/bin/ksh
352	/usr/local/bin/zsh
 
Zsh shows itself to be smaller than all the others, with the exception of
ksh, and vastly smaller than bash.  Unless I am missing something, zsh
seems quite the opposite of bloat.  With all its awesome features, how can 
it be done?
 
Please cc me in your reply, for I am not subscribed.
 
Joseph


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-07-21  7:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-21  7:31 zsh bloat? Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
2000-07-20 21:26 R Joseph Wright
2000-07-20 21:43 ` Ollivier Robert
2000-07-20 23:51   ` R Joseph Wright
2000-07-20 21:46 ` Zefram

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).