zsh-users
 help / color / mirror / code / Atom feed
From: Axel Beckert <abe@deuxchevaux.org>
To: zsh-users@zsh.org
Subject: Re: "embedded": tips for a small(er) zsh installation size?
Date: Fri, 18 Jan 2013 18:14:15 +0100	[thread overview]
Message-ID: <20130118171415.GW15534@sym.noone.org> (raw)
In-Reply-To: <CAHwuDSDbE4Kq5Q+S5hL1VEJr-WxSQFg6=0YrBZNP14S_yTurQA@mail.gmail.com>

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@deuxchevaux.org  (Mail)
 X   See http://www.asciiribbon.org/              | abe@noone.org (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)


  parent reply	other threads:[~2013-01-18 17:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHwuDSDEw6u7gcApnVXiH8jjmtdVmZcJoWSWC+_k7uw6H_gnMA@mail.gmail.com>
2013-01-18 10:54 ` Francisco Borges
2013-01-18 11:29   ` Peter Stephenson
2013-01-18 11:53     ` Peter Stephenson
2013-01-18 15:54       ` Bart Schaefer
2013-01-18 17:14   ` Axel Beckert [this message]
2013-01-18 18:00     ` Bart Schaefer
2013-01-18 18:34       ` Axel Beckert
2013-01-18 20:56     ` Francisco Borges

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130118171415.GW15534@sym.noone.org \
    --to=abe@deuxchevaux.org \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).