Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zcompile bug? zcompile on a single script setting up a chpwd function
- X-seq: zsh-workers 47429
- From: Doron Behar <doron.behar@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: zcompile bug? zcompile on a single script setting up a chpwd function
- Date: Wed, 7 Oct 2020 11:09:15 +0300
- Archived-at: <https://zsh.org/workers/47429>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-10/20201007080915.a353fhv3pxdku7kc%40ZENIX>
- Authentication-results: zsh.org; iprev=pass (mail-wr1-f48.google.com) smtp.remote-ip=209.85.221.48; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=9BTkzG8cUBmleTq7iqer7LU0FavezkMiu/A4ued3sPE=; b=PQkcFv57XAg942/gJlSA/jU0cg9GViCwQbVAct87WoRS1Z2jmlf+q3Z/ul5xDpGOih IUUFFm2ZyhYt5e29oywBPLDbWZITlfDVWqnsE5YKdzDz4DwN4GAySlNEhL6kB1SMNyMt r2zFW58X49EEait/pW8R4iyeXAgstO0aDy1GnzyoqGX9bZDfmC4vTy+EzdS6C9QYh2U+ df6v4OCn6Pm73SAuUV4krNkkfHFZzBLei7ee2EylC2XLmPvTNcrODeSxnR5awdeAP9lN 8J4Idbxc83K+zIw71IZzjH+mtza0dVik7yL2BEhQbumdM0C6e5vI2ISIJ2mVTOmzesRv Qt0Q==
- In-reply-to: <CAN=4vMpj-cGcJsLrpdcRNvuex1cOYkw5rPrQL=trmt=K-2oKEg@mail.gmail.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- Mail-followup-to: zsh-workers@xxxxxxx
- References: <20201007074832.xharzoxhtecnjovy@ZENIX> <CAN=4vMpj-cGcJsLrpdcRNvuex1cOYkw5rPrQL=trmt=K-2oKEg@mail.gmail.com>
- Sender: zsh-workers-request@xxxxxxx
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@xxxxxxxxx> 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.
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author