This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
slow ar on cygwin windows patch
- To: binutils at sources dot redhat dot com
- Subject: slow ar on cygwin windows patch
- From: Mike Stump <mrs at windriver dot com>
- Date: Thu, 25 Jan 2001 15:54:02 -0800 (PST)
I've found that I need the below patch on Windows to prevent it from
being 233 times slower when cygwin (B19) is hosting when an achieve is
being created with 14 .o files. Without this patch, it was taking
over a minute, with the patch, 0.3 seconds, a worthwhile win.
2001-01-25 Mike Stump <mrs@kankakee.wrs.com>
* rename.c (smart_rename): Don't use chown/chmod on Cygwin on
Windows, it is very slow.
*** rename.c.old Mon Oct 4 14:06:46 1999
--- rename.c Thu Jan 25 15:45:31 2001
*************** smart_rename (from, to, preserve_dates)
*** 178,183 ****
--- 178,187 ----
ret = rename (from, to);
if (ret == 0)
{
+ /* This speed up creating an archive with ar with 14 .o
+ files 233x on Windows, this functionality isn't worth the
+ slowness. */
+ #if ! defined (_WIN32)
if (exists)
{
/* Try to preserve the permission bits and ownership of
*************** smart_rename (from, to, preserve_dates)
*** 196,201 ****
--- 200,206 ----
if (chown (to, s.st_uid, s.st_gid) >= 0)
chmod (to, s.st_mode & 07777);
}
+ #endif
}
else
{
------------------------------