zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: fpath+="${(u)fpath[@]}" can hog system
Date: Thu, 28 Jan 2016 08:49:06 +0100	[thread overview]
Message-ID: <CAKc7PVBQfay7WU2LTJ1PXPyJ4eqjR2o4KDhE811Tb4DX=x4LHg@mail.gmail.com> (raw)
In-Reply-To: <160127145041.ZM6525@torch.brasslantern.com>

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


      reply	other threads:[~2016-01-28  7:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27  9:36 Sebastian Gniazdowski
2016-01-27 22:50 ` Bart Schaefer
2016-01-28  7:49   ` Sebastian Gniazdowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKc7PVBQfay7WU2LTJ1PXPyJ4eqjR2o4KDhE811Tb4DX=x4LHg@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).