0

I have cygwin and wsl installed on Windows 10.

Commands in cygwin run much slower than in wsl :

~$ uname; time date CYGWIN_NT-10.0 Sat Nov 21 12:12:37 2020 real 0m0.825s user 0m0.203s sys 0m0.156s 
~$ uname; time date Linux Sat Nov 21 12:12:36 2020 real 0m0.045s user 0m0.000s sys 0m0.031s 

Some online articles suggested removing /etc/{group,password}, I tried it, with no improvement.

What else can I try ?

5
  • 1
    you've discovered one of the selling points of WSL. comes down to differences in emulation strategy Commented Nov 21, 2020 at 19:26
  • The difficulty with Cygwin is that it is not *nix at all. It’s windows .exe files pretending to be a *nix environment. WSL is of course still windows but has been built into the Windows kernel (AFAIK). This lets the Microsoft WSL authors make optimisations that Cygwin authors never could. Commented Nov 22, 2020 at 1:48
  • 1
    Still, there's no good justification for the date command to take almost a whole second! On my machine: CYGWIN_NT-6.1 real 0m0.018s. Something's seriously wrong there. Commented Nov 22, 2020 at 3:05
  • Agreed. real 0m0.019s here. Even my older, slogging PC does sub-tenths: 0.095s. Commented Nov 23, 2020 at 9:16
  • Strange. real 0m0.056s here with Cygwin 10.0 too Commented Nov 30, 2020 at 19:04

1 Answer 1

1

Usually for such slow effect , it is the loading time and AV scanning

running 2 times in a row:

$ time date Mon, Nov 30, 2020 5:39:14 PM real 0m0.294s user 0m0.015s sys 0m0.046s $ time date Mon, Nov 30, 2020 5:39:17 PM real 0m0.046s user 0m0.000s sys 0m0.000s 
1
  • Indeed, it seems to have something to do with AV, but not with AV scanning, as I ran the command at different times. Commented Nov 30, 2020 at 21:33

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.