delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/02/14/12:51:06

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: 14 Feb 2001 12:46:08 -0500
Message-ID: <20010214174608.17253.qmail@lizard.curl.com>
From: Jonathan Kamens <jik AT curl DOT com>
To: cygwin AT cygwin DOT com
Subject: Followup on eliminating symlink ReadFile calls -- it's not
necessary

I asserted yesterday that Cygwin Make was being slowed down by the
ReadFile calls necessary to determine if a file should be considered
executable and whether or not it's a symbolic link.  I was only half
right.

DJ Delorie suggested using "mount -x" to eliminate the ReadFile for
determining whether a file is executable, and adding a new mount
option to indicate that there are no symbolic links under a particular
mountpoint, to eliminate the other ReadFile.

I implemented his suggestion, adding a "-l" flag and a corresponding
MOUNT_NO_SYMLINKS flag, and did some performance testing on the
result.  I was surprise to discover that mounting with this option
didn't provide any additional performance improvement over "-x".

This inspired me to do a more careful reading of the code, at which
point I noticed what I should have noticed before -- the ReadFile to
check for a symbolic link doesn't happen unless the system attribute
is set on a file.  In other words, the performance hit we were seeing
in Make was due entirely to the ReadFile checking for executability,
NOT to the ReadFile checking for symbolic links.

Therefore, the current Cygwin already has the ability to eliminate
this performance hit -- you just need to mount filesystems with "-x",
and no additional changes to Cygwin are necessary.

Thanks to everyone who responded to my messages yesterday offering
suggestions that helped me track this down.

Given the magnitude of the performance improvement when "-x" is used,
I wonder if its use should be recommended in the documentation, or
perhaps it should even be the default behavior.

  jik

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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