Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Extended globbing seems to have become much slower in recent versions of Zsh
On Mon, 07 Mar 2016 10:59:31 +0100
Jesper Nygårds <jesper.nygards@xxxxxxxxx> wrote:
> As a side note, since I have implemented this in zsh, I followed what I
> thought was "zsh best practice", and composed this rather complicated file
> list with a zsh glob expression, instead of relying on an external command
> such as gnu "find". But after I discovered this bottle neck in my scripts,
> I have experimented with instead letting "find" find the files, and indeed
> that seems a whole lot faster. I mention that just to be sure that I am not
> causing you to waste your time if my use case is so extreme that it's not
> worth bothering about its performance.
"find" is much more optimised for, well, finding files, rather than
doing general globbing / pattern matching tasks, so I think that makes
perfect sense if that's what your basic job is. I often do that myself
for a very deep tree.
However, that doesn't mean everything on the zsh side is as good as it
can be.
I won't commit my patch unless I can find some way it's clearly not
doing what I intended that I can fix --- but it's useful to know the way
it's done at the moment isn't obviously causing problems as I've always
wondered.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author