Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: "embedded": tips for a small(er) zsh installation size?



Hi,

On Fri, Jan 18, 2013 at 11:54:11AM +0100, Francisco Borges wrote:
> I created zsh package for OpenWrt. So far so good. I already have an "ipk"
> file that installs and runs properly in my router.
> 
> My package installs /bin/zsh and /usr/share/zsh/5.0.2/functions.
> 
> Right now I am installing all completion functions but that is an overkill.
> For instance, I really do not need "Completion/AIX" for one. Is there any
> simple way to turn off the installation of these?

Nice idea.

I tried that with the Debian zsh package. Using the following sed
oneliner helped to remove stuff very likely not needed on Debian:

sed -e 's:Completion/\(AIX\|Darwin\|Solaris\|Cygwin\|Mandriva\|openSUSE\)/\*/\* ::g' -i config.modules

But the gain in free disk space inside /usr/share/zsh was just about
5% as most of the disk space is needed for Completion/Unix.

> Any other tips on shrinking installed size?

I don't know, but depending on your installation it may help to just
install the .zwc files and not the source and the .zwc files. As I
have been told on IRC, it should suffice for running zsh to have the
.zwc files instead of their source around.

Then again, in my case the Unix.zwc is bigger than the Unix directory
contents it's generated from, but I suspect a performance penalty if
you just install the source instead of the .zwc files. :-)

ncdu shows nice where the disk space is going to:

--- /usr/share/zsh/functions/Completion --------------------------------
                               /..
    3.0MiB [ 33.9% ##########]  Unix.zwc
    2.3MiB [ 26.5% #######   ] /Unix
  380.0KiB [  4.2% #         ] /Zsh
  284.0KiB [  3.1%           ] /Base
  256.0KiB [  2.8%           ] /Debian
  252.0KiB [  2.8%           ]  Base.zwc
  248.0KiB [  2.7%           ] /X
  244.0KiB [  2.7%           ]  Linux.zwc
  236.0KiB [  2.6%           ]  Debian.zwc
  220.0KiB [  2.4%           ]  Zsh.zwc
  212.0KiB [  2.3%           ]  X.zwc
  200.0KiB [  2.2%           ] /Linux
  172.0KiB [  1.9%           ]  Solaris.zwc
  164.0KiB [  1.8%           ] /Solaris
   76.0KiB [  0.8%           ]  Darwin.zwc
   76.0KiB [  0.8%           ] /BSD
   68.0KiB [  0.8%           ]  compinstall
   64.0KiB [  0.7%           ] /Darwin
   60.0KiB [  0.7%           ]  BSD.zwc
   52.0KiB [  0.6%           ] /Cygwin
   48.0KiB [  0.5%           ] /AIX
   44.0KiB [  0.5%           ]  Redhat.zwc
   36.0KiB [  0.4%           ]  Cygwin.zwc
   32.0KiB [  0.4%           ]  Mandriva.zwc
   28.0KiB [  0.3%           ] /Redhat
   28.0KiB [  0.3%           ] /openSUSE
   24.0KiB [  0.3%           ] /Mandriva
   20.0KiB [  0.2%           ]  openSUSE.zwc
   16.0KiB [  0.2%           ]  compinit
   16.0KiB [  0.2%           ]  AIX.zwc
    8.0KiB [  0.1%           ]  bashcompinit
    8.0KiB [  0.1%           ]  compaudit
    4.0KiB [  0.0%           ]  compdump

		Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@xxxxxxxxxxxxxxx  (Mail)
 X   See http://www.asciiribbon.org/              | abe@xxxxxxxxx (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)



Messages sorted by: Reverse Date, Date, Thread, Author