Zsh Mailing List Archive
Messages sorted by:
Re: startup delay from compinit
- X-seq: zsh-users 6661
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: startup delay from compinit
- Date: Tue, 7 Oct 2003 15:40:01 +0000
- In-reply-to: <20031007105820.GA23911@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20031007105820.GA23911@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Oct 7, 7:58pm, Anthony Heading wrote:
} I'd like to start using the "new" completion system, but
} running compinit from .zshrc seems to take about two seconds
} I'm using a 750Mhz Solaris sparcv9 machine).
That's rather odd. On my paltry 233MHz i586-linux PC, it takes on the
order of 1 second to run "compinit -D" (which explicitly skips and does
not recreate .zcompdump), about 2 seconds to run "compinit" when it is
creating .zcompdump, and less than 1 second when loading from .zcompdump
after it exists. Starting from a fresh "zsh -f" every time and running
compinit by hand, that is.
Are you perhaps dealing with automounted NFS filesystems that frequently
expire and have to be remounted?
} I believe I've followed the instructions in zshcompsys, and
} have .zcompdump being created, and so on. So am I doing something
} wrong, or is this time overhead to be expected?
If you want us to determine whether you're doing something wrong,
you'll have to show us exactly what you added to your .zshrc or other
startup files for this, not just tell us vaguely what you believe.
} If so, is there any alternative way to load all the completion
} functions lazily?
The functions themselves are all loaded lazily no matter what -- all
compinit does is create autoloads for them. If anything is taking time,
it's scanning the directories to discover what functions are available.
That always happens unless you use "compinit -C", regardless of whether
the .zcompdump file exists.
Did you build and install zsh yourself? Did you configure it with
--enable-function-subdirs? It may be taking a lot longer to scan a
directory hierarchy than it would a flat directory -- you should try
--disable-function-subdirs, which is what I use, and see if that
speeds things up.
Messages sorted by: