zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Experts Ravioli <experts.ravioli@gmail.com>
Cc: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: Setting cdablevars adds 10-15s to run time for non existing command
Date: Mon, 22 Mar 2021 19:55:33 -0700	[thread overview]
Message-ID: <CAH+w=7Ykqoi0tXN0NY_pLTZd0zHKwWZg2_7u4iJ_FwY=f7-DUQ@mail.gmail.com> (raw)
In-Reply-To: <CAMoJa6=uehHiLJfzbrLiJ9hn4GgS9R8sMgsC3_CJnx8Mz5BROA@mail.gmail.com>

Meant to reply to this a while ago but it fell down the stack.

On Thu, Mar 18, 2021 at 4:42 PM Experts Ravioli
<experts.ravioli@gmail.com> wrote:
>
> If I use `setopt cdablevars` in my .zshrc and then I try to run a `insert_random_command_name_here` (which does not exist) the prompt returns after 10-15s.
[...]
> setopt autocd autopushd pushdminus pushdsilent pushdtohome cdablevars
>
> Does anyone have any idea?

It's not (just) cdablevars, it's autocd.  When you have both of those
set, zsh attempts to interpret 'insert_random_command_name_here' as a
possible reference to a directory to which to (auto)cd, which in turn
results in a check for whether it should create parameter table
entries for any location that might be related to that name.  If your
$path and $cdpath contain either a lot of directories or some
potentially-slow remote mount points, that operation could be very
time consuming.  If it succeeded, the result would be cached and be
fast the next time, but failure is always slow.


  reply	other threads:[~2021-03-23  2:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 23:42 Experts Ravioli
2021-03-23  2:55 ` Bart Schaefer [this message]
2021-03-23 12:40 ` Stephane Chazelas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7Ykqoi0tXN0NY_pLTZd0zHKwWZg2_7u4iJ_FwY=f7-DUQ@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=experts.ravioli@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).