Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Speeding up ZSH startup
- X-seq: zsh-users 8746
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Andrey Borzenkov <arvidjaar@xxxxxxxxxx>
- Subject: Re: Speeding up ZSH startup
- Date: Sun, 24 Apr 2005 01:46:44 +0200
- Cc: zsh-users@xxxxxxxxxx, Meino Christian Cramer <Meino.Cramer@xxxxxx>
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cOBh88WSx/jXrugxz5sfk7X5FXUHw8KrJfiFJlrtvarNh5kPU8wsXbRrVHjkluolW7RtA1GlVUyu1XBJ809yUOOayX1lcAHbAEY6obUqO6Ao6JYlG4pVQgU1RWbyZRdsjtRV3uW9Joeh8xHSWkGQVmJcfC8m6Q3yg7/UXkFS0qQ=
- In-reply-to: <200504231254.54270.arvidjaar@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050423.082943.74746308.Meino.Cramer@xxxxxx> <200504231254.54270.arvidjaar@xxxxxxxxxx>
- Reply-to: Mikael Magnusson <mikachu@xxxxxxxxx>
sorry if gmail messes up the To: and Cc: here...
On 4/23/05, Andrey Borzenkov <arvidjaar@xxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author