Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: One more heap optimization trick for zsh < 5.2

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

# declare -f n-list
n-list () {
/Users/sgniazdowski/.zplugin/plugins/psprint---zsh-navigation-tools ''
n-list "$@"


First run is slow, second is normal and fast:


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