Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :cc:content-type;
        bh=lts9W+iq2LPD09ieTar38R+tBY+LzMfpM6V9NZ9/pt4=;
        b=DjnltRLltar8NnISH26IYPu2l0rxtedFFMEwHjvsLfdW8WJKxVnQBCm7i+RMmW81SY
         8hOUfGGlUf9GAmcc/WVapHxZCQqCk+wmmuPk1c1aVWoZhtHEID00wLHR7aEZv2PyF5ds
         iJZuTzEShW6wCT2TiaH4b3/u2oJn7brGfN0t7m3Al86chM354X++wFyN3dMajhthoEa5
         gWNaUGnE3oOcidPvwIno4wDYdrYWxbHL5f19Q+C5xIBOMZ7fOhitD5Sil4bdZONm5OHw
         E3h7QOeqCulhrmPmHPLDZ70qmWbwUqJnnPVOXXThGSbaVboq2E4TrR0pFysIAB60guNT
         pQ4A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:cc:content-type;
        bh=lts9W+iq2LPD09ieTar38R+tBY+LzMfpM6V9NZ9/pt4=;
        b=SY+YG3wJEfHWX4rzUZheJclUgBS7z0RKQf3SvnYzs01r64M3htjuRJCCFfmKzDP5IK
         YLwNz1DzIXH1QeYShdiKe2M7mhKKoLNLJem0Dw0bzO6j+oZ1T3j0HBr319bY/SB4+c5J
         oTQTQTB9bfO/2EwZr4iVcvT18ADXzz01GUbNhiolRQC0l4QZVFc83yroDg169E24YnwP
         80qZjJXhe/KA10Kale3HCtKhc9BKl9cs+lA44R0c1RoK37poPpCso1QS6HpHzt0IpK12
         sU4mJySrCKa03HgCkOv2FY4An2p1GITs+VS2oH1hI9Ss0FmHxxZZKCajPON1xhuQ7GBN
         vM4w==
X-Gm-Message-State: AG10YOQemt+22WCR4cq5NDdyqL8/M/uiGZOmmwUVS4tLJjoOXQcc2+y7IC0zMP9Z6I8/OEhhFqBH/IaLE1jIhw==
X-Received: by 10.25.151.9 with SMTP id z9mr497496lfd.72.1453967365628; Wed,
 27 Jan 2016 23:49:25 -0800 (PST)
MIME-Version: 1.0
In-Reply-To: <160127145041.ZM6525@torch.brasslantern.com>
References: <CAKc7PVB6x-Eip=v1ctT_Ehf762MXHgBdxP1d7AwcQKX=B5sg8w@mail.gmail.com>
 <160127145041.ZM6525@torch.brasslantern.com>
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Date: Thu, 28 Jan 2016 08:49:06 +0100
Message-ID: <CAKc7PVBQfay7WU2LTJ1PXPyJ4eqjR2o4KDhE811Tb4DX=x4LHg@mail.gmail.com>
Subject: Re: fpath+="${(u)fpath[@]}" can hog system
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Content-Type: text/plain; charset=UTF-8
X-Seq: zsh-workers 37824

On 27 January 2016 at 23:50, Bart Schaefer <schaefer@brasslantern.com> wrote:
> Why would you do that?  What's the intended result?

I wrote this by accident and saw my system going high load

> Yeah, if you increase the size (in bytes) of $fpath by 20! (factorial),
> and then make a copy of that, you are going to consume a buttload of
> resources.

It's a typical situation that I cannot submit a bug because it
reproduces in my long scripts but not in short examples. Sadly this
will probably another one for the collection. And in that collection
some might not be actually bugs. fpath+="${(u)fpath[@]}" hogged my
system after single execution (not in loop) in a freshly opened shell,
few times. That's all I can say. Tried this now and it doesn't
reproduce. That said your point about 20! is important, my script
loaded say 18 plugins  each time calling fpath+="${(u)fpath[@]}", so
this is how all the topic happened, and possibly it wasn't a bug...
Probably the only way to use such reports is taking a glance at
related source code and luckily noticing something

Best regards,
Sebastian Gniazdowski

