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

Re: startup delay from compinit



In the last episode (Oct 07), Anthony Heading said:
> I'd like to start using the "new" completion system, but running
> compinit from .zshrc seems to take about two seconds, which is
> frustrating since otherwise a new xterm takes only a few tens of
> milliseconds to be ready to use. (For ref, I'm using a 750Mhz Solaris
> sparcv9 machine).
> 
> 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 so, is there any
> alternative way to load all the completion functions lazily?

Is your home direcory used by different machines running zsh?  compinit
will regenerate the .zcompdump file if it thinks it doesn't match the
current system.

I run this in my startup script instead of plain compinit:

compinit -d $(print -P "${ZDOTDIR:-$HOME}/.zcompdump_%m")

which creates a separate ~/.zcompdump_machinename for each machine I
log into.
 
-- 
	Dan Nelson
	dnelson@xxxxxxxxxxxxxxx



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