From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21862 invoked by alias); 12 Dec 2015 16:43:23 -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: 21086 Received: (qmail 18849 invoked from network); 12 Dec 2015 16:43:22 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=kv3GIlS7ILaD/IGu1oxBLAJYsghpPFV+xwzjE3vVw9E=; b=MNuoaChursZ3cy1moIbV4oNVs7RJhkLZxCVDiMnEqRvEUH8d5md2rVAZq2MI+ohNsW YxkfC1BLf9SLQKD5Z1smV8tdPfdyUnAFrD4ogDHvk7ArKsTPZFxzi/5yAC82LGrmltSg 7CupNZok4GrCd213PjkM84nnTKaQEnCbgjt4yQu5Z1Ot8X4ANLV4RjjAktENtm8iiGSs aTeW9QRUUIZID4Ji6daGxtWYse4ib9GmM7SQmbaYmKMwscGH6wptUkIEu7HkDy1rRxCJ GABZbsb7HA3gaxNqTmBeBX+/0cVXkzNVAw7sNGmpP9UNjTMaGiajpGrH2PlbBG9lmS/o mDrw== X-Received: by 10.25.146.79 with SMTP id u76mr10181600lfd.146.1449938600483; Sat, 12 Dec 2015 08:43:20 -0800 (PST) Subject: Re: zsh slow and hogs cpu when using */*/*.ext on large file tree To: zsh-users@zsh.org References: <566B1D81.2090106@gmail.com> <566C4623.1020205@gmail.com> From: Piotr Karbowski Message-ID: <566C4EA6.5050704@gmail.com> Date: Sat, 12 Dec 2015 17:43:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On 12/12/2015 05:33 PM, Sebastian Gniazdowski wrote: > PS. I wonder if operating system didn't cache the work that zsh has > done. In other words, in such situation, every following run of */*/* > will be fast. That's why I couldn't test this on my machine (which is > OS X) and I asked you to test. > > If you are somehow able to overcome operating system optimizations > (i.e. e.g. every run of */*/* on 5.1.1 is 20 seconds long) then the > values you gave are reliable and usable. Otherwise, bash my benefit > from zsh run. Actually it does not seems that 5.1.1 is much slower than 5.2. My report was wrong as the grep did not showed up for 20s as with first X files it wasn't finding anyting, here I've tested with ls. But anyways, if I drop the VFS caches with `echo 3 > /proc/sys/vm/drop_caches` before every test, the zsh 5.2 takes 5.546s and bash 4.3.42 takes 3.295 thus we can presume that the VFS layer on ext4 filesystem I run here takes about 3.0s, rest is within the userspace. -- Piotr.