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 10201 invoked from network); 29 Sep 2021 09:55:05 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 29 Sep 2021 09:55:05 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1632909305; b=QLvsoGzkqvefsYU/VHlYzsQXBCR3cmTEZCjp/7Dtvkl+Dc8g6Yurcaf/iwtxlikZJSUIejOS4M 7lnjbxoH+WiMrTPrgPxs6HWCTixO3FNKLABpzJnVFgIXu6NhqxTd9yzIIwoZSfGSfXBvBR4QIc D1IYA7XyeWAgJJ3EGAv68I/+xJMErUdv01euknqw13GUv1IObCrOL9voNaa0/AbbNFb6f/Rxcq xxPo26r4Z/yza1tQ50+8pKT9EB03BZIrAMervP6Elh7QlRe5YGEUTK4Fk3wYDUod8QVYZUSG5W 6FutD5gvKUeAUb4SzbL9rSob6c3mdquWzNuO13w5e6Oc/g==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-qk1-f175.google.com) smtp.remote-ip=209.85.222.175; dkim=pass header.d=gmail.com header.s=20210112 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-20210803; t=1632909305; bh=Um/nB1fJWgK6v0A6+CiXJNkC/T2Q3wMNbGe4WzOeNzA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=KqXavRt7pSZ5xMbew7IeRgHjHCDux7aiATSfDA7J7Mw/VFFVPbK66lOhJkDSab7Lpk6QxD7R3h TEmabVDGCcLovT+q33kNaZVB6aw3dHyJTjG45E5pcX2GfaXyNw7bwXQRVEq8ei9dpa2oWVw+zZ Z/nQ2BwcZNkq+x3bDbHkraOfwIs/TGp/ApRY+nvzWMYmQoqY3CAuQxsUNY8rkI/eLlLRQSGfw/ 91Epceqq1Z8yAe0rjqFaCBq0MDCFY82u3XPMhbX63VgH3hSB+PLqrpCFzzKZ3f2fph5VxOCb9s TfTo+Y9eve5keotBpnXSeK4suOL2KXR247sezS188LVQWw==; 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-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ITnCf1F3ORo0LkY00Aecje6fcEKmaEqxZhBd4tD2Cvw=; b=YX3HnoOs83c7J2IhWN6Revh//c WbzFozqPRdpLCNAv3zJmbGrHyxLPN6r1JXlkpyzmVYxlvqL7kLp075l70TG5vL+X9vrD2wya9WdU5 k+0vF6pYyxe0crF94GuDwYjQYQxmlv+jFkZ578nK+5Q/D1y28hk8obDzEenmOQ57CAriSxpsUCWns fU9J4K7DWcZE5T77u2lE2qDGARhv+Nj8OB2KSAR5of+WnY009H7H/citfUn4iPby3Gq8ufR83nlj0 d0khgMPcmPBrqshVloPoXabS+dyXVPH0gAjjHs9JWjLpW653d/+ydKTMTNeIdpCUlMIar3YmoWK5t cxItACDA==; Received: from authenticated user by zero.zsh.org with local id 1mVWIr-000FKq-7d; Wed, 29 Sep 2021 09:55:05 +0000 Authentication-Results: zsh.org; iprev=pass (mail-qk1-f175.google.com) smtp.remote-ip=209.85.222.175; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-qk1-f175.google.com ([209.85.222.175]:40791) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mVWI5-000Eap-73; Wed, 29 Sep 2021 09:54:17 +0000 Received: by mail-qk1-f175.google.com with SMTP id 72so1690220qkk.7 for ; Wed, 29 Sep 2021 02:54:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ITnCf1F3ORo0LkY00Aecje6fcEKmaEqxZhBd4tD2Cvw=; b=gygGi2LniW1CZjq6ZWNvziVD/IFcwgzzHcnxs3zwqj7hfpi8KP/eCEu5IEEGmGlTZ+ Yr294JlUozdRbMbuiBo8N50CjyAfLriRSFR/nmkCpC2ysO0RQhOfbFWOjjftzcVmonWz p1CX/QUufsKfAIcPd9hEqv+ozMH6Dey7C+QPLy3sOJwJugbHkH82k08f0W1Z74R35ZV2 EBmAzVt8W9vKUZMwvFwBX5Lk8rTMGLKuQmRU3bJHMEMnYCV3EEJffqfmpBY/zf7xTEKz gLHJUiK4wSndGWNANrI08NMjLjRXrlGYhiUNonsyNwSPzRfIs/eeI+diHkE46XE8ThxZ P6zQ== 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:content-transfer-encoding; bh=ITnCf1F3ORo0LkY00Aecje6fcEKmaEqxZhBd4tD2Cvw=; b=ZxgTZFI+q+Wm7HamLuvpsKDOt4M4ppsV3Q7RwdTD6mmxCHQznHhQt2I/yJ1Co1XJX4 JQMTMBZI5wYS1FejA2Sf8sClaDE3fxzxMRHhDUpNRRp/13puRhIcZau/kdaePwghHud9 TBKZ4MDEGDuP6EuxY5l1JcNJdP+2gChNNjmrL+Ay7GM4BxWSo+1YgJoPdNaIDtDTH1cz wSA5tqHqvW7L9XC5E+Xh/eH1LuhLzakzqkW0Ou0JLGhjekPV4/wXbA8D4YF2A65BWIHm lkPKBIGIU61IIg2IQPnnvgbpt038Q7kgpA0sGIzP0ZoB6mVKQt246xNFbQV4GZZQU426 cPvw== X-Gm-Message-State: AOAM531CRzq6tkFJbwduv324KKGqBoOjXnOdci9qohSs/R9ttmL6UqjP /wCGqfUTwQCETuq0dYmE/8/kGsFGoK4Eox5wsDE= X-Google-Smtp-Source: ABdhPJy20PpgbiNLTQcnl7xwDvGI/x5sduYxyrsBpFeor6EjbUk6ujFylkBAb2sv9pSViS1g/Z/gZONKWAhHEM7aD+c= X-Received: by 2002:a37:9244:: with SMTP id u65mr4358387qkd.46.1632909255990; Wed, 29 Sep 2021 02:54:15 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Wed, 29 Sep 2021 11:54:04 +0200 Message-ID: Subject: Re: Adding a completion file has created a delay in ZSH startup time To: =?UTF-8?B?UGV0ZXIgU2zDrcW+aWs=?= Cc: Zsh-Users List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 27168 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 Wed, Sep 29, 2021 at 11:45 AM Peter Sl=C3=AD=C5=BEik wrote: > > Hello, > > I've added ~/.zsh/completions to fpath: > > fpath=3D(~/.zsh/autoload ~/.zsh/completions $fpath) > > this seemingly simple change has added 1 or 2 seconds to ZSH start time. This usually happens when compinit is invoked before and after you modify fpath. The biggest offender here is Ubuntu. Its global zshrc has this awfulness: # If you don't want compinit called here, place the line # skip_global_compinit=3D1 # in your $ZDOTDIR/.zshenv if grep -q '^ID.*=3D.*ubuntu' /etc/os-release && [[ -z "$skip_global_compinit" ]]; then autoload -U compinit compinit fi The solution is to add skip_global_compinit=3D1 to ~/.zshenv. Naturally, you also need to ensure that your own rc files invoke compinit only once, after all changes to fpath. Roman.