From: "Dan Vasaru" <dvasaru@broadpark.no>
To: <cygwin@cygwin.com>
Subject: BASH slow on network share scripts (was RE: A Simple Real World Benchmark for cygwin)
Date: Wed, 04 Sep 2002 14:44:00 -0000 [thread overview]
Message-ID: <CHEDKHJJDLOCCOFLMGEAKEJECLAA.dvasaru@broadpark.no> (raw)
In-Reply-To: <20020904112249.D1213@cygbert.vinschen.de>
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/
next prev parent reply other threads:[~2002-09-04 21:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-02 8:20 A Simple Real World Benchmark for Cygwin Rick Richardson
2002-09-02 8:36 ` Ville Herva
2002-09-02 8:55 ` A Simple Real World Benchmark for cygwin Christopher Faylor
2002-09-02 14:34 ` Dan Vasaru
2002-09-02 15:02 ` Christopher Faylor
2002-09-03 1:28 ` Corinna Vinschen
2002-09-03 2:38 ` dvasaru
2002-09-03 4:52 ` Corinna Vinschen
2002-09-03 4:59 ` Robert Collins
2002-09-03 5:42 ` Corinna Vinschen
2002-09-03 9:05 ` Dan Vasaru
2002-09-03 23:34 ` Bjoern Kahl AG Resy
2002-09-04 1:55 ` Corinna Vinschen
2002-09-04 2:10 ` Bjoern Kahl AG Resy
2002-09-04 2:22 ` Corinna Vinschen
2002-09-04 14:44 ` Dan Vasaru [this message]
2002-09-04 20:07 ` BASH slow on network share scripts (was RE: A Simple Real World Benchmark for cygwin) Christopher Faylor
2002-09-02 9:06 ` A Simple Real World Benchmark for Cygwin Michael Hoffman
2002-09-02 11:37 ` Randall R Schulz
2002-09-02 21:31 ` Jeremy Hetzler
2002-09-03 10:58 ` Eric M. Monsler
2002-09-04 10:54 ` Shankar Unni
2002-09-05 17:50 ` Randall R Schulz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CHEDKHJJDLOCCOFLMGEAKEJECLAA.dvasaru@broadpark.no \
--to=dvasaru@broadpark.no \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).