zsh-users
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Andrey Borzenkov <arvidjaar@newmail.ru>
Cc: zsh-users@sunsite.dk, Meino Christian Cramer <Meino.Cramer@gmx.de>
Subject: Re: Speeding up ZSH startup
Date: Sun, 24 Apr 2005 01:46:44 +0200	[thread overview]
Message-ID: <237967ef050423164619588c97@mail.gmail.com> (raw)
In-Reply-To: <200504231254.54270.arvidjaar@newmail.ru>

sorry if gmail messes up the To: and Cc: here...

On 4/23/05, Andrey Borzenkov <arvidjaar@newmail.ru> wrote:
> On Saturday 23 April 2005 10:29, Meino Christian Cramer wrote:
> > Hi,
> >
> >  I am at the very beginning of dvinig deeper into the wonderful world
> >  of ZSH :O)...
> >
> >  I want to speed up the start of zsh on my Linux system.
> >  WIth "zsh -x" I figured out what file are loaded when and I found no
> >  abnormal things (reloading and such...). The different fiel, which
> >  got loaded are of "normal" size (so nothing VERY big...).
> >
> >  Is there any other things or tricks I can try to make starting zsh a
> >  little faster ?
> >
> 
> If you use "new" completion (compinit) then the slowest part is reading and
> parsing all completion functions.
> 
> You can speed it up by precompiling; see zcompile and function autoloading in
> Zsh manuals.
> 
> I do something like
> 
> for i in $fpath; do
>   zcompile $i $i/*(N)
> done

I have this function that i call from time to time manually as root
and my user (the one for my user doesn't have the systemwide files),

src () {
	autoload -U zrecompile
	[ -f ~/.zshrc ] && zrecompile -p ~/.zshrc
	[ -f ~/.zlogout ] && zrecompile -p ~/.zlogout
	[ -f ~/.zlogin ] && zrecompile -p ~/.zlogin
	[ -f ~/.zcompdump ] && zrecompile -p ~/.zcompdump
	[ -f /etc/profile ] && zrecompile -p /etc/profile
	[ -f /etc/profile.env ] && zrecompile -p /etc/profile.env
	for a in $fpath
	do
		[ -d $a ] && zrecompile -p $a.zwc $a/*
	done
}

> and wrapper function that checks modification time to automatically recompile
> if needed.
> 
> >  For example: Are there feature known, which are better to be
> >  activated at last/at first...
> >
> 
> it depends on your rc files actually. Ubuntu ships zero rc files for zsh and
> startup is very fast :)
> 
> -andrey
> 
> 
> 


-- 
Mikael Magnusson


      parent reply	other threads:[~2005-04-23 23:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-23  6:29 Meino Christian Cramer
2005-04-23  8:54 ` Andrey Borzenkov
2005-04-23 10:26   ` Mads Martin Joergensen
2005-04-24 21:02     ` Nikolai Weibull
2005-04-25 16:57       ` Andrey Borzenkov
2005-04-23 16:18   ` Meino Christian Cramer
2005-04-23 16:22     ` Bart Schaefer
2005-04-23 23:46   ` Mikael Magnusson [this message]

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=237967ef050423164619588c97@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=Meino.Cramer@gmx.de \
    --cc=arvidjaar@newmail.ru \
    --cc=zsh-users@sunsite.dk \
    /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).