Mail Archives: cygwin/2002/09/05/18:54:59
Corinna,
Tnx for taking the trouble of fixing the symlinks. Let's hope it was worth
it :)
I have uncovered another problem now, with the CYGWIN port of bash.
At least when reading/executing a script, bash checks whether the file
descriptor is seekable; if not, it will not perform input buffering of any
kind.
The CYGWIN port of bash short-circuits the test by claiming the input is not
seekable:
bash/input.c
#ifndef __CYGWIN__
# define fd_is_seekable(fd) (lseek ((fd), 0L, SEEK_CUR) >= 0)
#else
# define fd_is_seekable(fd) 0
#endif /* __CYGWIN__ */
The result is abysmal performance when the script resides on a network
drive, since bash will read one byte at a time (ultimately resulting in a
network packet per script byte, assuming the OS does not cache the script).
/bin/bash is tens of times slower compared to /bin/sh for an e.g. 200kb
SAMBA-resident script file. I know, it's a BIG script.
Since CYGWIN seems to go to some length to allow O_TEXT seeking, I believe
the ifdef above to be a remnant of some times where cygwin1.dll didn't
support text seeks, and I propose to remove it.
I don't know who to contact on this issue, so someone please notify the
current bash-cygwin maintainer ?
Dan
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -