X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <4F2C2589.2000907@t-online.de> References: <4F2C2589 DOT 2000907 AT t-online DOT de> Date: Fri, 3 Feb 2012 13:54:22 -0500 Message-ID: Subject: Re: Slow stat() on noacl mounts due to x permission check From: Earnie Boyd To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q13IsgjF000739 On Fri, Feb 3, 2012 at 1:20 PM, Christian Franke wrote: > Cygwin stat() may be much slower on noacl mounts than on acl mounts.This is > because on noacl mounts the x-permission bit is guessed by checking for > "#!", ":" or "MZ" in the first bytes of the file. AFAIKS this is done for > all files except *.exe, *.lnk and *.com. > > A real world testcase with 20120201 snapshot on a (C++/Java development) > tree with ~52000 files in ~12000 dirs: > > .                            noacl  acl > find -size ... (after boot)   518s  51s > find -size ... (disk cached)   13s   8s > find -name ... (disk cached)    3s   3s (does not need stat()) > > Is it really needed to do the header check for each file? > Yes. > Would it break important use cases if the check is only done for files with > typical script file extensions? > For example: no extension, .sh, .csh, .pl, .py, ... > Yes it would break my use of this feature. > Another more flexible solution would be a mount option to configure this. > (xguess=0: no check; 1: some extensions only; 2: all files) > The default should be the existing behavior. -- Earnie -- https://sites.google.com/site/earnieboyd -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple