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
--
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