From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by sourceware.org (Postfix) with ESMTPS id 882CA3858402 for ; Thu, 21 Dec 2023 17:43:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 882CA3858402 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSW.ab.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=SystematicSW.ab.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 882CA3858402 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=216.40.44.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703180629; cv=none; b=jl3PCbmm+SfyAPmbxs+CTnJwuagaTzFz8cdTJCvMX41fOmo+rJSwL/F4RGW+FlbcAKsNPe/oHzdYcBOh2DPGuCB6W5xu++juGlQzhYP7WWFNEDWiUMZMQiq4I5tLt2x/RODJr9bZNFTMGfcerRoo0Fjf+q7rm3ByjSvCy/PxFO0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703180629; c=relaxed/simple; bh=b4dCTQqIGJWMJRwVPQ3DenQGu3/sPoaNAN3AGL1vBSk=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=iw35SBiwza7EGAh3YELPfdfSnJw5SqjJMqbJ45QY/+EHkuZ03+7UgmGBD2Hw6TwgD1or+cDZS0ZvQ/lIEEl1DwyCtyt+tev4Yy4pS9VzBoK//srhhGEjneDXecXadUdsFmwrIPGUpH9cB3uTytEa0oiXLuN325Fx4QGk3n67gME= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from omf12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 13BC3407C7 for ; Thu, 21 Dec 2023 17:43:47 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: Brian.Inglis@SystematicSW.ab.ca) by omf12.hostedemail.com (Postfix) with ESMTPA id 882261D for ; Thu, 21 Dec 2023 17:43:45 +0000 (UTC) Message-ID: <4e9855ea-0850-44d7-8930-a1c6610db491@SystematicSW.ab.ca> Date: Thu, 21 Dec 2023 10:43:44 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Reply-To: cygwin@cygwin.com Subject: Re: rfe: CYGWIN fslinktypes option? Re: Catastrophic Cygwin find . -ls, grep performance on samba share compared to WSL&Linux Content-Language: en-CA To: cygwin@cygwin.com References: <07c7379e983c9f436ebf86e3818ca843@kylheku.com> From: Brian Inglis Organization: Systematic Software In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 882261D X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Rspamd-Server: rspamout06 X-Stat-Signature: yc76ntdn1b3dnkpktnyowgtp5cxepms6 X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361 X-Session-ID: U2FsdGVkX1+8YEjQSe1QhtHbWFdQT+lq/U8U37lXqKI= X-HE-Tag: 1703180625-324935 X-HE-Meta: U2FsdGVkX1/8zSVPkcJoonpbioO+EkyLATIWL1+UvecAnTDnzqbl1V+5FvTYSXCi1ekoHTXjkcIBNSyPzzZi0L8Vav7YCsc6le2Vge1pctbl2inUhAlnSyregrV2suJIwEzEpWmXsGiJSKzaRI5IVB9vBFVRgROlEQOdct597WQFOyukIHvtyJGwo2+Sg2QMhv4UxSPqEAaREHfIuazQzBmHFxcg2UWW4b3vGU3WVXG1Ho6tmjXQs7fP+lKy1dM3TWB5gO3g7Ohk8gU61dM4ZiczywyjyOtiAGFxQLxMpr9ZfciuTZaS7OnL0felfozJWNC4+IoggsJ4sZkB1IYM+FNRp4gg/busqtN5RF1TkXmg/yv2dS98xUWwkHWslBZZuMzKv9EEMewF/58G21cPYRDmzoxXndXD0zdszoyVpXu+7W5G/DK/ZqUmp7M0evyn X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-12-21 09:10, Cedric Blancher via Cygwin wrote: > On Thu, 21 Dec 2023 at 13:17, Martin Wege via Cygwin wrote: >> On Wed, Dec 20, 2023 at 6:21 PM Kaz Kylheku via Cygwin wrote: >>> On 2023-12-17 22:22, Dan Shelton via Cygwin wrote: >>>> It would be nice if someone from the Cygwin authors could assist me in >>>> figuring out why this happens. >>> Cygwin is famously slow; this is nothing new. We are grateful >>> for Cygwin because it makes stuff work at all; if it were blazing >>> fast that would be a bonus. >>> >>> E.g. git operations (clone, rebase, ...); ./configure scripts; ...: all >>> run like molasses. >>> >>> The following is just my fast and loose opinion, shot from the hip, >>> and possibly off or wrong, but it likely has to do with the layering. >>> Cygwin's core API is based on a C library called Newlib. Cygwin bolts >>> Newlib to Windows by means of an additional shim below Newlib that >>> is based on C++ objects, where there is path munging going on and such, >>> and that's where the Win32 calls get made. It's an additional abstraction. Cygwin is a newlib libc implementation providing some POSIX functionality using C++ functions calling x86_64 Windows functions, often entirely replacing a group of newlib functions, to support OS features or POSIX equivalents, including locales, UTF-8 and other multi-byte character sets, time zones, files, directories, processes, to provide as complete as possible hosted OS features, rather than newlib's usual base embedded RT (OS or not) targets. >> I disagree with that. Ok, part of that is that the layering causes >> more memory allocations and copies, but this is not the root cause. >> >> The root cause is IMO the extra Win32 syscalls (>= 3 per file lookup, >> compared to 1 on Linux) to lookup the *.lnk and *.exe.lnk files on >> filesystems which have native link support (NTFS, ReFS, SMBFS, NFS). >> On SMBFS and NFS it hurts the most, because access latency is the >> highest for networked filesystems. Run some commands under strace to produce logs with timing info and tell us how much that is a time factor, relative to the Windows emulation time, and the application functions? >> So my proposal would be to add an option ('fslinktypes') to the CYGWIN >> environment variable to define which types of links are supported: >> default 'all'. which is an shortcut for 'native,lnk,lnkexe'. >> So in case people do not want 'lnk' link support they just add >> CYGWIN+=' fslinktypes:native' to env, to turn off support for >> lnk/lnk.exe style links, and be happy. >> >> @Corinna Vinschen Would that be acceptable? > > +1 for this proposal, which is almost the same idea as I proposed in > https://www.mail-archive.com/cygwin@cygwin.com/msg174612.html We are all volunteers here, so you can clone the repo, install the cygwin package build deps, follow the build instructions, make the required changes, rebuild, install and test the dll, then git format-patch/send-email to cygwin-patches list for consideration. -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry