Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: One more heap optimization trick for zsh < 5.2
- X-seq: zsh-users 21568
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: One more heap optimization trick for zsh < 5.2
- Date: Mon, 16 May 2016 17:01:28 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- 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; bh=cKNaYCJGOuZpsWYTxBGBvuHrRFCyC7nlJI6Gm8H07qY=; b=yqdz9WgPo8wEeotLfjJO3+3U6nrAxFiHgRktzevb+sc6KVe3LP5BQS5erYLpEcxEhi Vi6g+V7DSW0+/libFQfQllJpShdRMd3sQ3Xq3byB6At3PL8SZNFdfdML1F/Nx3BhDEYi TIhOej0LWz68UhDxo4z53usE0BFL8jj0NFPka6Hai+DsuhhWQLQGLU8dvGm8FUV0I+8W US5l4x9GGwx+ofgcHwyBg4oqi0YL7bxulpbNHAeopgxNrhJWA5hOoCjwk8jSaSIylP1G +PAc2SUgz+g+n/aM2E0Y6bfDntQgKa1WR32d4FcmF8xHfuhd4iw55XX0GkkPfeXjuaEx 0gkQ==
- In-reply-to: <160508093530.ZM9686@torch.brasslantern.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVDRk2hx9i0T62fnD=v__1RbB9sPr5ni_mHXLojVa4sotA@mail.gmail.com> <160508093530.ZM9686@torch.brasslantern.com>
On 8 May 2016 at 18:35, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> 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.
I was testing the same input with 89k lines. The cause now
accidentally clarified. It's about zplugin's shadowing of autoload
function that does the neat trick that allows to copycat what autoload
does:
# declare -f n-list
n-list () {
--zplg-reload-and-run
/Users/sgniazdowski/.zplugin/plugins/psprint---zsh-navigation-tools ''
n-list "$@"
}
https://github.com/psprint/zplugin/blob/28b615c6d728b22ec87a86026e7a463d731184ae/zplugin.zsh#L273-L287
First run is slow, second is normal and fast:
https://asciinema.org/a/99ercap3i6nri6ybiiayd0ejb
It's hard to describe what *reload-and-run does but you are the author
of this neat trick so I can skip this. How do you think what can be
happening inside Zsh?
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author