zsh-workers
 help / color / mirror / code / Atom feed
From: Doron Behar <doron.behar@gmail.com>
To: zsh-workers@zsh.org
Subject: Re: zcompile bug? zcompile on a single script setting up a chpwd function
Date: Wed, 7 Oct 2020 11:09:15 +0300	[thread overview]
Message-ID: <20201007080915.a353fhv3pxdku7kc@ZENIX> (raw)
In-Reply-To: <CAN=4vMpj-cGcJsLrpdcRNvuex1cOYkw5rPrQL=trmt=K-2oKEg@mail.gmail.com>

On Wed, Oct 07, 2020 at 10:01:24AM +0200, Roman Perepelitsa wrote:
> 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.

The point is that I have done nothing that could corrupt the zwc file -
it's how zcompile generated it.

I won't use it though, listening to your advice, and think how to
improve it's execution.

Thanks, Doron.

> 
> Roman.
> 


  reply	other threads:[~2020-10-07  8:09 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
2020-10-07  8:09   ` Doron Behar [this message]
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=20201007080915.a353fhv3pxdku7kc@ZENIX \
    --to=doron.behar@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).