Bash reacting very sloooow to every command on Windows/Cygwin

Posted by flori Wed, 04 Jul 2007 11:57:00 GMT

I have just installed an openssh server with Cygwin on my Windows XP, in order to be able to login from some other machine. I followed the following tutorial to configure the service. I was pleasantly surprised, that after mounting my home directory on the mountpoint /home/flori via a smb share, the bash correctly parsed my .bashrc and .bash_profile files in my $HOME.

Unfortunately after doing this the bash paused for a rather long time after every command I entered. I first suspected some strange DNS timeout to occur, but that wasn't it. Then I noticed that the smbd on my file server was quite busy during all the pauses. I straced the smbd, while this was happening, and figured out the cause of bash's slow response time: The bash tried to check if new mail had arrived in my $MAIL repository to out output the usal "new mail has arrived" message!

MAIL was set to $HOME/Maildir and the bash searched through my inbox after every command. This is usually unnoticeable under Unixen (be it via NFS or on a local file system), but the smb share took quite some time (many seconds) to do it. This was aggravated by the fact, that the Cygwin bash didn't set MAILCHECK to 60 seconds or more, which caused the delay after every command. As a simple and radical remedy I just unset the MAIL environment variable, because I never cared much for the new mail message anyway.

Tags , ,  | no comments