zsh-workers
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: zcompile bug? zcompile on a single script setting up a chpwd function
Date: Wed, 7 Oct 2020 10:01:24 +0200	[thread overview]
Message-ID: <CAN=4vMpj-cGcJsLrpdcRNvuex1cOYkw5rPrQL=trmt=K-2oKEg@mail.gmail.com> (raw)
In-Reply-To: <20201007074832.xharzoxhtecnjovy@ZENIX>

On Wed, Oct 7, 2020 at 9:48 AM Doron Behar <doron.behar@gmail.com> wrote:
>
> The function `_chpwd_task_contexts_parser` defined in that file slows
> down the shell startup time, and I was looking for a way to improve the
> situation. I tried simply zcompiling it

zcompiling doesn't improve execution speed of functions. It can
benefit you only if parsing takes a long time. Given the small size of
file `taskwarrior` (3.5KB), parsing should be almost instantaneous (at
most 1ms), so the speedup from zcompiling won't be noticeable.

> I get on startup:
>
>         [3] 27780
>         /home/doron/.zsh/chpwd/taskwarrior.zwc:1: no such file or directory: ^G^F^E^D^A

Looks like taskwarrior.zwc is corrupted. My practical advice is to
simply remove this file and not waste time on zcompile as it won't
help you anyway. Slow shell startup is likely caused by the slow
execution of _chpwd_set_task_context. You'll need to either avoid
invoking this function or make it run faster.

Roman.


  reply	other threads:[~2020-10-07  8:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07  7:48 Doron Behar
2020-10-07  8:01 ` Roman Perepelitsa [this message]
2020-10-07  8:09   ` Doron Behar
2020-10-07  8:12     ` Roman Perepelitsa
2020-10-07  8:18       ` Doron Behar
2020-10-07 14:30     ` Bart Schaefer

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='CAN=4vMpj-cGcJsLrpdcRNvuex1cOYkw5rPrQL=trmt=K-2oKEg@mail.gmail.com' \
    --to=roman.perepelitsa@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).