From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12330 invoked by alias); 7 Mar 2016 10:15:43 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21370 Received: (qmail 9814 invoked from network); 7 Mar 2016 10:15:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-AuditID: cbfec7f4-f79026d00000418a-0d-56dd54ca2931 Date: Mon, 07 Mar 2016 10:15:34 +0000 From: Peter Stephenson To: Zsh Users Subject: Re: Extended globbing seems to have become much slower in recent versions of Zsh Message-id: <20160307101534.46475d9e@pwslap01u.europe.root.pri> In-reply-to: References: <160229111212.ZM4272@torch.brasslantern.com> <160301102807.ZM8036@torch.brasslantern.com> <160301160356.ZM10258@torch.brasslantern.com> <20160304140342.4477e2c1@pwslap01u.europe.root.pri> <20160304142046.7e1bc9ba@pwslap01u.europe.root.pri> <20160304214921.06c6587f@ntlworld.com> <160305094723.ZM22954@torch.brasslantern.com> <20160306181009.412c31be@ntlworld.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsVy+t/xy7qnQu6GGfTPEbTYcXIlowOjx6qD H5gCGKO4bFJSczLLUov07RK4MvasjSu4ylmx+uN2xgbGq+xdjJwcEgImEqser2KCsMUkLtxb z9bFyMUhJLCUUeLY6XWsEM40Jok3+/rYQKqEBE4zSsx56ACROMMosXjRJRaQBIuAqsSGxoVg Y9kEDCWmbprNCGKLCChKnPn1DWyFsEC0xIR3i5lBbF4Be4nFK5+B1XMKBEts/PGaHWLofnaJ vzvOg23jF9CXuPr3E9R99hIzr5xhhGgWlPgx+R7YYmYBdYlJ8xYxQ9jaEk/eXWCFuFRd4sbd 3ewTGIVnIWmZhaRlFpKWBYzMqxhFU0uTC4qT0nMN9YoTc4tL89L1kvNzNzFCwvnLDsbFx6wO MQpwMCrx8F7guhsmxJpYVlyZe4hRgoNZSYTXPwgoxJuSWFmVWpQfX1Sak1p8iFGag0VJnHfu rvchQgLpiSWp2ampBalFMFkmDk6pBsZCcdtznmv/NbVf4w1d93XzkxUym+cKtrIKykq21K1l 0GO5MvXMzpqjcUtsRFLCNt/8JnPx84zAl+lzlMQflcecr/Otb2FJa9nnuuyag1nlWdas2ULX F8aJ8VnzXPnikrz/lNkpPV+/T+V970RUNG3vWvK8cxOOSEy7vTQpWXyF/P27obcP3VBiKc5I NNRiLipOBACZWnL4YwIAAA== On Mon, 07 Mar 2016 10:59:31 +0100 Jesper Nyg=C3=A5rds 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 n= ot > 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