Subject: Re: fpath+="${(u)fpath[@]}" can hog system
From: Sebastian Gniazdowski <[email-masked]>
To: Bart Schaefer <[email-masked]>
Cc: Zsh hackers list <[email-masked]>
Date: Thu, 28 Jan 2016 08:49:06 +0100
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On 27 January 2016 at 23:50, Bart Schaefer <[email-masked]> 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