Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "Once-a-day" long delay before startup
On 2011-08-18 21:05:58 -0700, Bart Schaefer wrote:
> Refer to my earlier reply -- do as soon as possible during startup:
>
> unsetopt hashcmds hashdirs hashlistall
>
> On my system "zsh -fc 'which ...'" takes about 40% as long with those
> options unset as it does with them set.
>
> Zsh is making the assumption that you'd prefer one big delay of a few
> seconds at startup, to many tiny delays all the while the shell is
> running. However, zsh's default options were determined in a time
> when path searching was slow and those "tiny" delays were a lot less
> tiny. Of course the tradeoff for getting your prompt sooner is that
> you're going to have a delay the first time you attempt command
> completion, because completion needs a filled hash table.
With HASH_DIRS, couldn't zsh fill the hash table only when the
directory is accessed? For instance, one may have remote directories,
for which the NFS server is sometimes down, near the end of the path.
So, when executing usual commands, the shell would not be affected by
problems with the NFS server.
Now, if zsh could fill the hash tables in background, this would be
even better.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author