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 18707 invoked from network); 7 Oct 2020 08:01:55 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Oct 2020 08:01:55 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1602057715; b=y1A2sDyUsKTt6xOTzMIMF+Ojzk1846SH6lhfzx59W0XLTj73tOJPCe/JHKm8jo/KCYTuxvlaEw alFvyRIbfplHjDXRggcrvPJmGD+j0gj/HG6p1cFlDGmGzkm4jE73Zhgz06UD56HcZ4CukrSA0c K5NGaTKWZU8tfy7haMqKABRngM3T73huXoJhEwnu/+Gjnqga+a/lyuM5C6hhS7y2+d4LnXThWO HJSHkmBtIgGsL2ci/eaA9QFF5et9jNSkI/n3m5NH4voln+gohQoZyDXM73eGLJPKj6CbpF6Z3D Zd4ri5/Re6qIBGOU+1+HKmr4g/H2tMb2p0Iqh8kNh9qJWw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-il1-f181.google.com) smtp.remote-ip=209.85.166.181; 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=1602057715; bh=WM8suzVIaLR5RfivPA/FR7r3FI0C6V4fIVKZvX3Tw60=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=zNrqwFmXi4wDq+eJ/0PnTFqfib7aNPWHMF3XWZHCw1WQYqS0Z1ACnSJBvaZTlkbYKR55geOtaA sS2pktXGvYBfMS1eGoegBhlbWrDdGVLami5JcxIDUwT0QTzgU/amHABnJbL8BFFeyzq1nZJS07 WoF8kmmdaTYazSDyNu7h8VcxdJd4C9BA0pcg/OXUQJusCaEWJ1X7QjeffRy3P7yS2bmoTMIIrr AE81BzGLDkJ85weMlxfsPleEUi+xsJEFB3i0eHw0od2f93BzcxPfDjCqBEteghA4chHRyf/1cr ZHdGiBWf00oJK8GuBoFjJHPxtTMVUNGzT+a6Cx74C+fv/Q==; 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:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=f02SaW3Gwhdl4lZS4WNPmUfdDxveeyJ0Ucm3xsM3Iz0=; b=QbtP0CXLAG8r3FJ7xMkAyeI5Ku pKO3xzicZNGT4bmKwfEW4q32pjrz7e+uRJ6+DLkQp53GDATBAByxlLO2fpVetWA6NZCSS0R/ih4Ac XnWXAJw6ottGcrUBTns4bxhCRPIumc8HgqcxreEpqvRmKyISSr0D/BPEE3zkoiw+HtnrF5xc/4BSc /emvtdVxTPVO29VlxaNw3ffAyRvtGI47lXZYiuam8Cc/MmIK9R0EHqxyBm4znHTTM7j/cv6UfrBe9 kRNbPbkC1iMxfkwxzQFfeLuq5YJj9e+ttrF5mCVHgT0brZiRQSFukwYXMKvFe9h4SOILQiNed+MrN QL6b7cjw==; Received: from authenticated user by zero.zsh.org with local id 1kQ4OX-0004zO-2k; Wed, 07 Oct 2020 08:01:53 +0000 Authentication-Results: zsh.org; iprev=pass (mail-il1-f181.google.com) smtp.remote-ip=209.85.166.181; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-il1-f181.google.com ([209.85.166.181]:34625) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kQ4OH-0004r9-04; Wed, 07 Oct 2020 08:01:37 +0000 Received: by mail-il1-f181.google.com with SMTP id b2so1492698ilr.1 for ; Wed, 07 Oct 2020 01:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=f02SaW3Gwhdl4lZS4WNPmUfdDxveeyJ0Ucm3xsM3Iz0=; b=F22UyIOr8+3FNPKpBy/zj/MPRkV+nHwvSjIbgTHknkfASFB+cEKmP2Q/356sxS5t4/ biGYr3Ohatf13g5N+Hk7WcA2wg/pxfPfwbxNQea8dfoeeFoN5MSx5AcX0VIEfamr/TxH w++00Lu+8XzZ6/9xPfERlvg13NNdgcMXIa9B6MAmy1bK5CKGa/qgFy+H1eUqft6a2VIP jFW1hxdOC06rfGch3+usAx6q8U59eAzoIuVLa+lze4cIMWZYk09goUCPrwVJaITh1dJb w+QEtYMpN23Mcekk8AZPi8a4+OV4IwuvhepHBhXl6ws3fk7dJAEeqNFbfXKSGvr7Tp1X Q8qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=f02SaW3Gwhdl4lZS4WNPmUfdDxveeyJ0Ucm3xsM3Iz0=; b=dI7enCfwuvGwjKKxepd5H2p2Ys82N7IoinN1MmW++OrynZvAD4aRGhqzD4vq9uDKda +g+E131jSU61as58CEK6p/u90qwHIhkzmbwzs+5BY1w2TZmWL6XyUz8PdfjJwYFR2Plf bw71RvZxDbe87tiyxDf8Ee56mT9p0k47o3cRLHlrZs+xXlltv0G2qG03o9R10llizWjq r0/XZz4d2Dd2d+VAEFR0fkFI9ivhaJ3HlPKfYHMpmLq+nLpBlSVocS6fC79Kn1zbbrYh hSMIwGhSAuANdTh7ShA5rYPB1T6+zocwjScnpw40E/cMzapLtPNXJoKhes2LoUOPv34z MA4g== X-Gm-Message-State: AOAM533RPMt3tibHHaKMXjfA2rURpxvWOJzyc3h+JT5p9Chzooa1V2IV h1It3fRzKrfmMjSHK2fOvF19C3ermDKL3VecXAk4/qDOmu4= X-Google-Smtp-Source: ABdhPJy079DTpT0jJwPJrC4loRt1T8wRQNhfzmNDecPiWKrp6uKy3Igv3EpPsyG7osUGKUfI/+ZCu11CWu9leTGTql8= X-Received: by 2002:a92:41c4:: with SMTP id o187mr1745607ila.304.1602057695174; Wed, 07 Oct 2020 01:01:35 -0700 (PDT) MIME-Version: 1.0 References: <20201007074832.xharzoxhtecnjovy@ZENIX> In-Reply-To: <20201007074832.xharzoxhtecnjovy@ZENIX> From: Roman Perepelitsa Date: Wed, 7 Oct 2020 10:01:24 +0200 Message-ID: Subject: Re: zcompile bug? zcompile on a single script setting up a chpwd function To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47428 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 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. Roman.