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

Re: Speeding up ZSH startup



From: Andrey Borzenkov <arvidjaar@xxxxxxxxxx>
Subject: Re: Speeding up ZSH startup
Date: Sat, 23 Apr 2005 12:54:53 +0400

> 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.

  ...hmmm

  When compiling  .zcompdump to .zcompdump.zwc I think it will start a
  little faster...but when will .zcompdump be created...and -- as a
  logical consequence -- when do I have to recompile it again ?

  Is there any automatism? Kinda "Dear ZSH, if you have recently
  created .zcompdump...please compile it for me..."

  (or am I blinded by too much programming tasks ???)
 
> 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
> 
> and wrapper function that checks modification time to automatically recompile 
> if needed.

  Aha! Sounds good...

> >  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 :)

  Ha!!!

  Less features means being fast...isn't it ?


> -andrey

mcc



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