Julia very, very slow in cygwin shell

I ran into a very strange problem (after upgrading cygwin, of course), where julia started from within a cygwin shell was literally unusable. it took about 1-2 minutes to get a prompt and it seemed to be frozen once the prompt appeared. I noticed that this problem could be fixed by not using the corporate network, i.e. for example, from home if i simply didn’t turn on VPN.

intertubes to the rescue, after a little searching I turned up this very useful link:


I’m using this computer on a corporate network and there seems to be some sort of problem when looking-up credentials. You can see lots and lots of accesses when you use strace. Why this seems to be a problem with the julia shell and doesn’t seem to affect the cygwin shell is a real mystery. You can see from the link that the solution was put together due to problems with the cygwin shell itself.

I’m going to put in the short version here in case the link disappears someday.

create local user and group files in /etc

$ mkpasswd -l -c > /etc/passwd 
$ mkgroup -l -c > /etc/group

make sure to modify /etc/nsswitch.conf

passwd: files
group: files

i.e., you want to get rid of “db”.

as the link states, be aware that upgrading cygwin seems to undo these changes, so they’ll have to be done again after every upgrade.

I’ve had a host of issues with cygwin on the corporate network, slow mapped drives in the path, the credentials thing, and other general slowness issues. None of which are presest when the computer is stand-alone. unfortunately those problems seem to affect julia.


1 Like