delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/12/22/09:05:52

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 5BME5q9M672020
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 5BME5q9M672020
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=mqF9onyj
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 47E2D4BA2E2B
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1766412351;
bh=8mlcaE2ETB/8+d5VOzZLlMFMero/br0lnnvopvGNFWw=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=mqF9onyjIC+IyizAdX3/e5NzwM86SiGUxlrxuAa6AEmFJVdLSR5FCJOzAFdgpJMEJ
yoRHqZT4SKRrKDXBtwcF0oXHKH89rSSaqZYIss9AilsETA2A7HJ4GmVkqqe/S5r39Q
gVYzmQvyI19Rf7htdS1hS1gQpOeEhUIW+J0M6UR0=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E3E7B4BA2E32
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E3E7B4BA2E32
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766412332; cv=none;
b=eb1ImLHmhsSu3uCxoe183Y29CYky45PMD3crk0PRnFxAmZmZ4JSL+oM4kTR1ird/4dlhQa17Y8i71hJLfKcLqaOcYqeO1dSauVlC0G//qDx1MBWPFNCHJ3WBjXm6Utj4aCpjw0WmVQl1OPneCezVfhsuSt9au1rfzSg7MNbbH6g=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1766412332; c=relaxed/simple;
bh=N8rRnkOnYT2Yug6xCAzzCOImkAjRi7d44CgTvX4KGlQ=;
h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;
b=ssohQI2PmJzECdK9UHop8ZgPZmhFYkhE6exkPdTGRwneQz/Mo9hcTK1YIBfbCChAJILVZMBgVQdljVBeskBQtZoG+vX3eFVFuDuwrAYwv+YFN11JB/sY7/WxLQGPy6UZbFdqNE9DjVGqhLhCnrAbbi0fZ6Emy0jw00U4NNhxa+4=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E3E7B4BA2E32
X-Barracuda-Envelope-From: moss AT cs DOT umass DOT edu
X-Barracuda-RBL-Trusted-Forwarder: 128.119.240.136
DKIM-Filter: OpenDKIM Filter v2.11.0 mailsrv.cs.umass.edu 836995BDA0
X-Barracuda-RBL-Trusted-Forwarder: 172.26.69.67
Message-ID: <f58b6ae4-1ba2-31cb-13ed-5ea1c63e0e4a@cs.umass.edu>
Date: Mon, 22 Dec 2025 09:05:27 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Subject: Re: Why is stat slow?
X-ASG-Orig-Subj: Re: Why is stat slow?
To: Jakob Bohm <jb-cygwin AT wisemo DOT com>, cygwin AT cygwin DOT com
References: <74bdc787-9099-8e29-492a-588546b6eedb AT cs DOT umass DOT edu>
<459d4abb-14fe-af09-f62d-defe3454e2c3 AT wisemo DOT com>
In-Reply-To: <459d4abb-14fe-af09-f62d-defe3454e2c3@wisemo.com>
X-Barracuda-Connect: mailsrv.cs.umass.edu[128.119.240.136]
X-Barracuda-Start-Time: 1766412330
X-Barracuda-Encrypted: TLS_AES_256_GCM_SHA384
X-Barracuda-URL: https://barramail.cs.umass.edu:443/cgi-mod/mark.cgi
X-Virus-Scanned: by bsmtpd at cs.umass.edu
X-Barracuda-Scan-Msg-Size: 1995
X-Barracuda-BRTS-Status: 1
X-ASG-Debug-ID: 1766412330-24039d6c3d4f09f0001-w5GHUG
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=3.5
QUARANTINE_LEVEL=10.0 KILL_LEVEL=9.7 test=
X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.125474
Rule breakdown below
pts rule name description
---- ---------------------- --------------------------------------------------
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Eliot Moss via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Eliot Moss <moss AT cs DOT umass DOT edu>
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

On 12/22/2025 8:57 AM, Jakob Bohm via Cygwin wrote:

> As a longtime aficionado of these issues, Cygwin/MSYS2 stat() function is
> inherently slower than native Linux/WSL stat() syscall, because the native
> stat returns data already kept and cached for each file system inode/MFTE,
> while the Cygwin emulation goes through a lot of hoops to synthesize similar
> information from a variety of file system data .  The call path that uses
> GetFileInformationByHandle() is the closest to a native fast implementation,
> but unfortunately, most 21st century antivirus solutions tend to initiate a
> full "scan file on open to prevent passing infected data to vulnerable
> applications" cost when doing the proforma file open to get the file handle
> needed for the GetFileInformationByHandle() call or other low risk checks .

> Another set of hoops in the stat() code is the synthesis of a simulated set
> of mode bits, which tends to bring in the entire ACL reinterpretation logic
> as well as detection of various symlink approximations (it would be faster
> to simply treat all "reparse points" as symlinks and add logic to readlink()
> that deals with the various native types, but that would loose the ability
> to create file system symlinks without the Administrator privilege of
> creating the more dangerous system objects also named "symlink" ).

> If the false triggering of AV scanning can be avoided, streamlining the
> Cygwin stat() code could greatly speed up heavy users of stat() such as the
> find and du commands .

Thank you, Jakob!  That gives me some interesting ideas.  First, one of my
mount lines indicates noacl, so I may be avoiding that cost.  (I am still a
little confused about having two mount lines and wonder which one takes
precedence (or some combination?).)  Concerning antivirus, maybe I can turn it
off for that drive.  It stores only tings I explicitly put there, which should
not need scanning for safety.

Regards - Eliot

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019