From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19587 invoked from network); 7 Oct 2020 08:09:57 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Oct 2020 08:09:57 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1602058197; b=r6CH2gzMVIfOmdB4EGaGF8WyPUQSOroWwXjq9q0vRwMvWghnuEgN7elFuKHVORPJb4Kpa+zzyK IcWAGOYHqqDdyXPJZAAGCwRyDKrcddeQ4BnG9RswTmVoFe7ZRbqAyP+bi8G9WhMlA7Blqlu9E5 uxq+SLPqG5qsiL4WuoCqAkgD4skM3ukAtRVNkpEgvOVzMSSBJepMPibENFGdhNXhqe1NmC3mOz 5vhgDM6RbU9X0P6aZtUiJD3du7HkW/hZL9LHdrIkRN9C/MrZKLrrQ1mMsZFIrKkw2XNt3Qmxrs ByZnzYdp4jKuxHFu/c2kDFYP/mjYyvwqSsGXRT6AO1+OGA==; ARC-Authentication-Results: i=1; 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1602058197; bh=izK+mUrUBb2Kyq/o2InQYj19uLF9Z9WU5fIzpsTi1TI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:From:Date:DKIM-Signature:DKIM-Signature; b=DNS4AtR+Pjg5zqGI7dmEsf/DxMObf1DxKLvtScdZoLU+kRVJ5tYOUMjAayyNqHhmBGcpowKWvU 6EJSs3j7X+Sjs7mazEZd/IZUggySsLFInYC9U/A4aFBFXnO+0Td5rAqwjjjONnSQfY4jukNkT2 J5k9XAPJerwcoeO3bMLPr+SIdItK9zxL818tuI6Hb1jMRHH5IrjbUJhaxSLNvKllP6RnfWNXzX 7qM46ZdbUCIqn8KzaRoXEWi51X5yJd9TrUA5D+G34h4zMz663K7enCQ7e/jCEmH0pTYqoc1pOl ZpPda6kGFiDZIxQynTd5ywX2LSGoVFMfjo8noHQPoNWmEQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=9BTkzG8cUBmleTq7iqer7LU0FavezkMiu/A4ued3sPE=; b=06nXPO2naZFctcdytdwaoOVdWz W9yIEFIj9x67POWtUg2XEUGncnZou+HKB/E+nAmKjDdNX3kVspINMCb7bELoWsXvdbhUuN3JTtP+R caXNrapcQERXzegETIxCQggGmnnFbpMclI6AjtqpdPI9RS7FGLzFcIh4L7lW10zBtRXotkBMRN9Ou sE0Bx8nHKslSVjrYuxMVqicPU2U5NbrbKvVTPfiSmpQebpe8FFcsuR9g3kRR3KAjzrEujkF+rUepG dt/nF/whrz0WYxxMsgi1HMZC3tlTrkcViyx44ZPX6idnyH69qBozevAJITZRZ1aBj9+TSpQh36d13 xdMKGyeA==; Received: from authenticated user by zero.zsh.org with local id 1kQ4WK-0005Qz-Fm; Wed, 07 Oct 2020 08:09:56 +0000 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 Received: from mail-wr1-f48.google.com ([209.85.221.48]:37443) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kQ4W8-0005Hm-Rw; Wed, 07 Oct 2020 08:09:45 +0000 Received: by mail-wr1-f48.google.com with SMTP id h7so1058257wre.4 for ; Wed, 07 Oct 2020 01:09:44 -0700 (PDT) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=9BTkzG8cUBmleTq7iqer7LU0FavezkMiu/A4ued3sPE=; b=Jwi2XEEa+mUix+BlTo5JXa9aVlCgYF4rqtQJlxeuFYhUNKbpcx3jMWH7ZL6xjwOwvD pLSUW7HLRMq9BzEe3+b8WN6AurVFsxl2o7b+sp8Bjxin+1IUEYgnq/Zjxj+ffUMcDR0o T0GUoM5nC04jGHp8qleWq6ZvdfjHGz9BTdTjc9G9H2+rhEUMa8lFNour3/bwqgiXt+P/ luIQ41kHnbooeutcnb7Vw7iaajsyEdvtN2x0E1mCTwe+KLHBBp5F673lAZ6GF6NkEi8/ bIqnup6t15Xq7MG9Hb5mUF95mCc8c09N0apKnULwb1e/ZOKEtkoQIflx9efLjv6uMIUy 7m9A== X-Gm-Message-State: AOAM531T6lvxLmNlHhYNwLgaOHvD4B9I/GJVPdM50XlnQnmzn7y7zwJN G4ZoHQB0Cyl6Teg+WH51qg2oWswAiFbzqg== X-Google-Smtp-Source: ABdhPJzqiAJoSIKLk/ni+LIz4veUlXoOp134WyGjStKHxr2A8O4gWcenANcdP67a7ocb1jErziLE5g== X-Received: by 2002:a5d:6944:: with SMTP id r4mr2082609wrw.151.1602058183927; Wed, 07 Oct 2020 01:09:43 -0700 (PDT) Received: from localhost (bzq-79-183-214-47.red.bezeqint.net. [79.183.214.47]) by smtp.gmail.com with ESMTPSA id e13sm1822636wre.60.2020.10.07.01.09.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 01:09:42 -0700 (PDT) Date: Wed, 7 Oct 2020 11:09:15 +0300 From: Doron Behar To: zsh-workers@zsh.org Subject: Re: zcompile bug? zcompile on a single script setting up a chpwd function Message-ID: <20201007080915.a353fhv3pxdku7kc@ZENIX> Mail-Followup-To: zsh-workers@zsh.org References: <20201007074832.xharzoxhtecnjovy@ZENIX> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Seq: 47429 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Wed, Oct 07, 2020 at 10:01:24AM +0200, Roman Perepelitsa wrote: > On Wed, Oct 7, 2020 at 9:48 AM Doron Behar 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. >