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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1534 invoked from network); 30 Nov 2021 04:13:02 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 30 Nov 2021 04:13:02 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1638245582; b=KPjLinJIWUJ/qXgL3NyJg8bGCkdPA065aop2BLIqEseWLXuZ4vwzBegXhrEjq9T7i7dIQZwQaw 9wBIPv5lV1n9n7hcVgHrR6BqFT03ifchJEURg795ln1IblxzBrUS2T7xbEMPPr5C98Aif/pT5Z /T18YzYZ0MhK1u3Hr089ONFo4lp4GRvQOwgTzyUwSZSqn5JzAS+4quySdweKd4i7XxUezUcWBL TsMGt8EXA+C6j8dn6qIKMTvrvy22MRaN3dfXbCH2dAVUqS827kN2eiZ56oay5eVEwuIYTzm1n5 tb8oK8Pna9Z43rn8dB6CtSUjeUoGi8hqYxhUDjsSJbXFlA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f169.google.com) smtp.remote-ip=209.85.219.169; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1638245582; bh=f95Iv4Sep/9/aYXbhhl6Zb2ecyLhOfcfJAcTm3hoVhA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=UEyJ4pvt5cl6mklnp7owKdsLSWl5/6SMl1IomOXT0zACd/racqON94HoLA3kSaRtPGMTOjFf95 0Lj+AFGb4uM35WckwvCo73a3ThtcorpEzpczVQWGDL2T/eZLHAsFeK6AFHIUO1Qmd0WLdzJg6/ pzprlpj5vBo9XnsMFASmIuPtTgsEUnw0GanQ/iMxXbeATMTmJZuPCrAnjMH5yP1+teC+ZC1LJ0 BptpM9eYpp8U80KbPX8lbEzVoAgsJgjMrCF4V5AS79Y7qos3/SGndPcLOXTt2RK/2FbHHPpPIj KY52bVZUZVxR4DtsHP4FZkdB5QD+Zpy8NOU8F7sUv+obXQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=z8tLZCXJng7AKEIGuKJUA8RkmCeYEKI/0P/PYOMgrW0=; b=RCviZx8nmFCkuqseODI9vsWwcH n5kZFmAIX6+evr6GEgaR0VIbcuQYN8ZriHMB9YaTfmqnCN100yun7jQmm3C+UsOfQAT4KMGa76Mcv HjkAEph450AuPTag6rHxAZvAE2LMraLs9fte/xfF6iK87Ag0+RDXlu3/NMaDd1t5AffF7PPynmJIl z50oC+tklNJihU2KRjuEXG1wL+ZFuoYs5DopgjnTNQE4ksT1unjlyrht5VeVy2fJcLFQmD3v/hRyB ex86V7RD4UV0JMryXLqJJPLQ+Y9P9RoDciIp35L1hx8P7Zz9Y+Vb/MEgzLCLpfa1ArtF9yCfrslmd ScJ2oo5Q==; Received: from authenticated user by zero.zsh.org with local id 1mruVm-0002Cv-Uq; Tue, 30 Nov 2021 04:12:59 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f169.google.com) smtp.remote-ip=209.85.219.169; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f169.google.com ([209.85.219.169]:39708) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mruUs-0001VZ-AW; Tue, 30 Nov 2021 04:12:03 +0000 Received: by mail-yb1-f169.google.com with SMTP id v203so48668657ybe.6 for ; Mon, 29 Nov 2021 20:12:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z8tLZCXJng7AKEIGuKJUA8RkmCeYEKI/0P/PYOMgrW0=; b=Zib1odkqpDkcoksOw0T4weA59yoWZIupcVxw+qH/3GYK0Xoigwhse84rMLP4lzEFDS N0pnMsdT3FAVRcTg/49/v/sLwyOFx9eG+/YJFAUDZyBcGtznHAGWShbkG30VTUOnZhm9 RETfW4xZT/uRKq0lY0kqyHqMsbsKQPAKsIbUhh43Q2y33S68ba+hEuV5C7l0q0m0MaWG UMFEPlDeP/XAOl7iBg9NkD7xGtUNcHnVsf906NTyZEjhI1eEHyu6pAsONyc8yR6NA3gu +N8KbjPTFacnrSqCzrN8+W6Muh9EpYnnQ8n15aI7yurQHrh23m8sU1iQBOwpQ+OtbNkU omHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z8tLZCXJng7AKEIGuKJUA8RkmCeYEKI/0P/PYOMgrW0=; b=0Vbdo56tpWXBbPNpYoqxrINXOD2t8lZjeVQbUQU+3v7JNpkWptnWuFd0m5osRH4IEp CL6X4F/5tsk5eEwoq1aUGkxS4nUG5aG82nAdip5rLetOjR6gBPUOyZL/43xQ+TiWxXxQ N8S+uLyFJqUnvghrPA37dAW+mw42sLXFVkTvutnl/QwuCGlb/V9SYQKDAYiLoa4o5rB6 ZhskE/zzREy90/OlKB4BD8g4FqyOiXPWorKCbRkd7c1oed7UgFriGHM1y06cqaaFmsHz HY0ujKbGm3xbxLak6gpHT9oLdriJIx+hh8f2f18egX7/CEL0DZNkQcJRf6G6BW5e37BQ +npw== X-Gm-Message-State: AOAM532lN78fvcm74edB2p/TrIEaVSpokjsmyLa0ToRTlBei4MnIjGmD acoVxNgm7nh0LAmPWSSwN+EKqsH5PW3+Dz2DPjDDNQ== X-Google-Smtp-Source: ABdhPJyyib0Kp/eO163e5K8SzwcWb5JY7TlYUZbwqyG4X6RuBcJ0fOy7A7t5XC839AVDEcqxtIE45RKZJgm4/lwYys4= X-Received: by 2002:a25:ae64:: with SMTP id g36mr38648033ybe.45.1638245520915; Mon, 29 Nov 2021 20:12:00 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Mon, 29 Nov 2021 20:11:45 -0800 Message-ID: Subject: Re: Shell startup, aliases vs. functions vs. autoloadable functions, and zcompile benefits To: Zach Riggle Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 27393 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Mon, Nov 29, 2021 at 6:30 PM Zach Riggle wrote: > > I would expect that the md5sum of a file is reasonably fast, and could be stored in the .zwc for sanity checking, instead of just the "newer than" check. To what are you comparing that checksum? It could tell you if the .zwc file were corrupted, but not whether the file differs from all the component files that were compiled into it. Even if you could somehow tell they were different, that doesn't answer the question of whether the .zwc contains newer versions of any of those functions. The .zwc does contain a check that it matches the parser version of the shell that's trying to read it. > I expect that I have more $fpath entries than usual, but the total number of autoloadable functions is much more. That's exactly the point: You're unlikely to ever execute most of those functions, so storing an autoload entry for them is much more space-efficient (and startup-time faster) than actually parsing and storing the function definitions themselves. > $ for d in $fpath; do n=$(ls $d/* | wc -l); echo "$n $d"; done | sort -nr | head -3 Good heavens, so many processes and pipes. n=($^fpath(e^'n=($REPLY/*(N.)); reply=("$#n $REPLY")'^)) print -l ${${(On)n}[1,3]}