zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: One more heap optimization trick for zsh < 5.2
Date: Sun, 8 May 2016 09:35:30 -0700	[thread overview]
Message-ID: <160508093530.ZM9686@torch.brasslantern.com> (raw)
In-Reply-To: <CAKc7PVDRk2hx9i0T62fnD=v__1RbB9sPr5ni_mHXLojVa4sotA@mail.gmail.com>

On May 8, 11:34am, Sebastian Gniazdowski wrote:
} Subject: One more heap optimization trick for zsh < 5.2
}
} repeat 1; do
}     list=( "${(@M)list:#(#i)*$~search_pattern*}" )
} done
} 
} I've recently found my system to be less responding to this trick.

Is $list getting larger e.g. you are accumulating more shell history
to be searched or the like?  IIRC the "repeat 1" trick caused a new
heap arena to be pushed instead of searching for free space in an
existing heap, but if $list is large enough to need multiple heap
arenas you may end up right back in the free space hunt.

} I thought that there's maybe an even better way
} to change how heap works for given operation?

If the size of $list is indeed the deciding factor here, I would
suspect that you're now running into heap management during the
pattern match against $~search_pattern, and there's really nothing
at the level of shell coding that can change pattern match behavior.

But all of that is speculation.


  reply	other threads:[~2016-05-08 16:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-08  9:34 Sebastian Gniazdowski
2016-05-08 16:35 ` Bart Schaefer [this message]
2016-05-16 15:01   ` Sebastian Gniazdowski
2016-05-17 10:18     ` Bart Schaefer
2016-05-18 15:16       ` Sebastian Gniazdowski
2016-06-11  3:30     ` Bart Schaefer
2016-06-11  7:40       ` Sebastian Gniazdowski
2016-06-11  8:07         ` Sebastian Gniazdowski
2016-06-12 15:39         ` Bart Schaefer

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=160508093530.ZM9686@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@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).