Re: Midnight Commander is very slow when starting and changing directories

2016-07-26 Thread Marco Atzeri

On 26/07/2016 11:39, Krzysztof Bociurko wrote:

Tried to list all drive letters (with help of
http://serverfault.com/questions/62578/how-to-get-a-list-of-drive-letters-on-a-system-through-a-windows-shell-bat-cmd)
and:

PS C:\Users\chanibal> wmic logicaldisk get
caption,providername,drivetype,volumename
Caption  DriveType  ProviderName  VolumeName
C:   3SSD
D:  3HDD
E:   5   < this is a DVD drive not
used for months (years?)

And it took close to the 4 seconds - similar to the issue I am experiencing:

PS C:\Users\chanibal> Measure-Command { wmic logicaldisk get
caption,providername,drivetype,volumename }
(...)
TotalSeconds  : 5,0886857
(...)

Disabling the DVD drive with Device Manager changed the above time to
0.063s, changed `ls /cygdrive` time to 0.015s and Midnight Commander
STARTED FINALLY WORKING IN REAL TIME. Thank you!


All right, now the question is WHY did this fail - I think it might be
considered Cygwin bug material, almost none windows app has failed
this way (with the exception of this windows mc build).



If both version of MC are stacked as also wmic, it is because all
asked the same thing to windows and it took 4 seconds
to receive and answer.

Not cygwin bug. Eventually of your DVD driver.

My DVD D: takes no time

 $ time /cygdrive/c/windows/System32/wbem/WMIC.exe logicaldisk get 
caption,providername,drivetype,volumename

Caption  DriveType  ProviderName  VolumeName
C:   3
D:   5
E:   3HD-Atzeri3

real0m0.156s
user0m0.015s
sys 0m0.062s





--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Midnight Commander is very slow when starting and changing directories

2016-07-26 Thread Krzysztof Bociurko
Tried to list all drive letters (with help of
http://serverfault.com/questions/62578/how-to-get-a-list-of-drive-letters-on-a-system-through-a-windows-shell-bat-cmd)
and:

PS C:\Users\chanibal> wmic logicaldisk get
caption,providername,drivetype,volumename
Caption  DriveType  ProviderName  VolumeName
C:   3SSD
D:  3HDD
E:   5   < this is a DVD drive not
used for months (years?)

And it took close to the 4 seconds - similar to the issue I am experiencing:

PS C:\Users\chanibal> Measure-Command { wmic logicaldisk get
caption,providername,drivetype,volumename }
(...)
TotalSeconds  : 5,0886857
(...)

Disabling the DVD drive with Device Manager changed the above time to
0.063s, changed `ls /cygdrive` time to 0.015s and Midnight Commander
STARTED FINALLY WORKING IN REAL TIME. Thank you!


All right, now the question is WHY did this fail - I think it might be
considered Cygwin bug material, almost none windows app has failed
this way (with the exception of this windows mc build).



2016-07-26 8:55 GMT+02:00 David Macek :
> On 25. 7. 2016 17:34, Krzysztof Bociurko wrote:
>> I have found this issue in a new incarnation - and this time it is NOT
>> with midnight commander but basic gnu utils.
>> Again it's the 4 seconds lost.
>>
>> $ time ls /cygdrive/
>> c  d
>>
>> real0m4.065s
>> user0m0.000s
>> sys 0m0.015s
>>
>> `ls /cygdrive/c` or `ls /cygdrive/d` take around 0.013s.
>
> Is it possible there's another -- unavailable -- drive letter, and the driver 
> needs to wait 4 seconds before declaring it unavailable/disconnected?
>
> --
> David Macek
>



-- 
Krzysztof Bociurko

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Midnight Commander is very slow when starting and changing directories

2016-07-25 Thread David Macek
On 25. 7. 2016 17:34, Krzysztof Bociurko wrote:
> I have found this issue in a new incarnation - and this time it is NOT
> with midnight commander but basic gnu utils.
> Again it's the 4 seconds lost.
> 
> $ time ls /cygdrive/
> c  d
> 
> real0m4.065s
> user0m0.000s
> sys 0m0.015s
> 
> `ls /cygdrive/c` or `ls /cygdrive/d` take around 0.013s.

Is it possible there's another -- unavailable -- drive letter, and the driver 
needs to wait 4 seconds before declaring it unavailable/disconnected?

--
David Macek



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Midnight Commander is very slow when starting and changing directories

2016-07-25 Thread Krzysztof Bociurko
I have found this issue in a new incarnation - and this time it is NOT
with midnight commander but basic gnu utils.
Again it's the 4 seconds lost.

$ time ls /cygdrive/
c  d

real0m4.065s
user0m0.000s
sys 0m0.015s

`ls /cygdrive/c` or `ls /cygdrive/d` take around 0.013s.

Interesting part from strace (full log attached):

   18   11803 [main] ls 4804 symlink_info::check: 0 =
symlink.check(D:\, 0xB4D0) (0x406000)
  19   11822 [main] ls 4804 path_conv::check: this->path(D:\), has_acls(0)
  29   11851 [main] ls 4804 fhandler_cygdrive::readdir: 0xC870
= readdir (0x60003EFD0) (d)
4061656 4073507 [main] ls 4804 normalize_posix_path: src /cygdrive/..
  77 4073584 [main] ls 4804 normalize_posix_path: checking
/cygdrive before '..'
  84 4073668 [main] ls 4804 normalize_posix_path: src /cygdrive
  18 4073686 [main] ls 4804 normalize_posix_path: /cygdrive =
normalize_posix_path (/cygdrive)

Also `mount`:

$ time mount
C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin64 on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
D: on /cygdrive/d type ntfs (binary,posix=0,user,noumount,auto)

real0m4.073s
user0m0.000s
sys 0m0.000s

Interesting strace part (full log attached):

  20   11447 [main] mount 3876 write: 64 = write(1, 0x60003A320, 64)
 178   11625 [main] mount 3876 fhandler_pty_slave::write: pty2,
write(0x60003A320, 64)
  18   11643 [main] mount 3876
fhandler_pty_common::process_opost_output: (1909): pty output_mutex
(0x100): waiting -1 ms
  18   11661 [main] mount 3876
fhandler_pty_common::process_opost_output: (1909): pty output_mutex:
acquired
  18   11679 [main] mount 3876
fhandler_pty_common::process_opost_output: (1948): pty
output_mutex(0x100) released
  20   11699 [main] mount 3876 write: 64 = write(1, 0x60003A320, 64)
4055597 4067296 [main] mount 3876 do_exit: do_exit (0), exit_state 1
  47 4067343 [main] mount 3876 void: 0x0 = signal (20, 0x1)
  19 4067362 [main] mount 3876 void: 0x0 = signal (1, 0x1)
  18 4067380 [main] mount 3876 void: 0x0 = signal (2, 0x1)
  17 4067397 [main] mount 3876 void: 0x0 = signal (3, 0x1)




2016-07-12 15:41 GMT+02:00 Marco Atzeri :
> On 12/07/2016 15:24, Krzysztof Bociurko wrote:
>>
>> Recompiled mc on cygwin with default and --without-vfs, did not fix issue
>>
>> Tried to install the unofficial win32 mc build that is not using
>> cygwin - and this issue is still there!
>
>
> I guess it is some BLODA.
> Cygwin can not really slow down a native application.
>
>>
>> I think this is not an issue with cygwin. Will try with MC's issue
>> tracker/mailing list/whatever they got.
>>
>> Could someone verify that the unofficial windows build of mc does not
>> use cygwin?
>> https://sourceforge.net/projects/mcwin32/
>>
>
> the description says
>
> "Windows XP+/32 bit native port of GNU Midnight Commander, based on the
> current 4.8.13/14 development stream."
>
> So I doubt was ever a cygwin one.
>
> I am not aware that there is another mc cygwin build around
> than then
> https://sourceware.org/ml/cygwin-announce/2016-05/msg00033.html
>
>
> Regards
> Marco
>
>
>
>
> --
> Problem reports:   http://cygwin.com/problems.html
> FAQ:   http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
>
--- Process 4804 created
--- Process 4804 loaded C:\Windows\System32\ntdll.dll at 7FFA14A1
--- Process 4804 loaded C:\Windows\System32\kernel32.dll at 7FFA13DB
--- Process 4804 loaded C:\Windows\System32\KernelBase.dll at 7FFA1113
--- Process 4804 thread 7632 created
--- Process 4804 thread 5672 created
--- Process 4804 loaded C:\cygwin64\bin\cygwin1.dll at 00018004
--- Process 4804 loaded C:\cygwin64\bin\cygintl-8.dll at 0003F6D1
--- Process 4804 thread 19060 created
--- Process 4804 loaded C:\cygwin64\bin\cygiconv-2.dll at 0003FA61
1   1 [main] ls (4804) **
  167 168 [main] ls (4804) Program name: C:\cygwin64\bin\ls.exe (windows 
pid 4804)
  172 340 [main] ls (4804) OS version:   Windows NT-10.0
   27 367 [main] ls (4804) **
   85 452 [main] ls (4804) sigprocmask: 0 = sigprocmask (0, 0x0, 
0x18031CBA8)
  320 772 [main] ls 4804 open_shared: name shared.5, n 5, shared 
0x18003 (wanted 0x18003), h 0xB4, *m 6
   70 842 [main] ls 4804 user_heap_info::init: heap base 0x6, heap 
top 0x6, heap size 0x2000 (536870912)
   34 876 [main] ls 4804 open_shared: name 
S-1-5-21-223587051-61534812-2133103721-1001.1, n 1, shared 0x18002 (wanted 
0x18002), h 0xB0, *m 6
   20 896 [main] ls 4804 user_info::create: opening user shared for 
'S-1-5-21-223

Re: Midnight Commander is very slow when starting and changing directories

2016-07-12 Thread Marco Atzeri

On 12/07/2016 15:24, Krzysztof Bociurko wrote:

Recompiled mc on cygwin with default and --without-vfs, did not fix issue

Tried to install the unofficial win32 mc build that is not using
cygwin - and this issue is still there!


I guess it is some BLODA.
Cygwin can not really slow down a native application.



I think this is not an issue with cygwin. Will try with MC's issue
tracker/mailing list/whatever they got.

Could someone verify that the unofficial windows build of mc does not
use cygwin?
https://sourceforge.net/projects/mcwin32/



the description says

"Windows XP+/32 bit native port of GNU Midnight Commander, based on the 
current 4.8.13/14 development stream."


So I doubt was ever a cygwin one.

I am not aware that there is another mc cygwin build around
than then
https://sourceware.org/ml/cygwin-announce/2016-05/msg00033.html

Regards
Marco




--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Midnight Commander is very slow when starting and changing directories

2016-07-12 Thread Krzysztof Bociurko
Recompiled mc on cygwin with default and --without-vfs, did not fix issue

Tried to install the unofficial win32 mc build that is not using
cygwin - and this issue is still there!

I think this is not an issue with cygwin. Will try with MC's issue
tracker/mailing list/whatever they got.

Could someone verify that the unofficial windows build of mc does not
use cygwin?
https://sourceforge.net/projects/mcwin32/

2016-07-11 15:23 GMT+02:00 Krzysztof Bociurko :
> Updated cygwin to 2.5.2, did not help.
>
> 2016-07-08 17:08 GMT+02:00 Krzysztof Bociurko :
>> Disabled windows defender real time and cloud based protection,
>> restarted Cygwin. No change.
>>
>> Updating cygwin will have to wait a bit.
>>
>> 2016-07-08 16:49 GMT+02:00 Marco Atzeri :
>>> On 08/07/2016 16:13, Krzysztof Bociurko wrote:

 I'm using midnight commander with Cygwin 64 bit on Windows 10 64 bit.

 After moving to a new machine and a clean reinstall of windows and
 cygwin, my midnight commander started to get very laggy - starting mc,
 any change of directory or exiting from finding files (to refresh list
 of files in the two panes) takes long seconds. Restarting doesn't
 help.

 I have no idea what could be the reason for these hiccups. MC normally
 works fine: arrow presses work well, viewing and editing is instant,
 but this one thing takes up to 10 seconds - changing directories.
 Searching in files has a similar lag, but only once (ie not in every
 `chdir` it could have done). In non-mc cygwin usage this issue doesn't
 happen.

 The task manager doesn't show any abnormally high CPU or memory usage
 on any process. I have `cygserver` running, using `bash` as my shell
 and have no fancy `PS1` settings, my `$CYGWIN` is only
 `winsymlinks:native`.

 My environment:
 * Windows 10 pro 64 bit, up to date
 * Not connected to a domain, no network drives
 * No anti virus software apart from the one built in Windows
 * Two hard drives (system on SSD (C:), D: is a SSHD), quite a few
 directory junctions from C: to C:, no loops
 * I'm usually using fatty as the terminal, but mintty has the same issues
 * GNU Midnight Commander 4.8.17
 * cygserver is installed

>>>
>>> two ideas to try:
>>>
>>> - update cygwin package as 2.5.2 versus the 2.5.1 that you are running
>>>   has few bug fixes that could change the responsiveness.
>>>   (unlike to work but worth to try)
>>>
>>> - disable the windows anti virus.
>>>   Experience in the past with Windows Defender were disappointing
>>>   https://cygwin.com/faq/faq.html#faq.using.bloda
>>>
>>>
>>> Regards
>>> Marco
>>>
>>>
>>>
>>> --
>>> Problem reports:   http://cygwin.com/problems.html
>>> FAQ:   http://cygwin.com/faq/
>>> Documentation: http://cygwin.com/docs.html
>>> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
>>>
>>
>>
>>
>> --
>> Pozdrawiam,
>> Krzysiek Bociurko
>> +48 664 964 967
>
>
>
> --
> Pozdrawiam,
> Krzysiek Bociurko
> +48 664 964 967



-- 
Pozdrawiam,
Krzysiek Bociurko
+48 664 964 967

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Midnight Commander is very slow when starting and changing directories

2016-07-11 Thread Krzysztof Bociurko
Updated cygwin to 2.5.2, did not help.

2016-07-08 17:08 GMT+02:00 Krzysztof Bociurko :
> Disabled windows defender real time and cloud based protection,
> restarted Cygwin. No change.
>
> Updating cygwin will have to wait a bit.
>
> 2016-07-08 16:49 GMT+02:00 Marco Atzeri :
>> On 08/07/2016 16:13, Krzysztof Bociurko wrote:
>>>
>>> I'm using midnight commander with Cygwin 64 bit on Windows 10 64 bit.
>>>
>>> After moving to a new machine and a clean reinstall of windows and
>>> cygwin, my midnight commander started to get very laggy - starting mc,
>>> any change of directory or exiting from finding files (to refresh list
>>> of files in the two panes) takes long seconds. Restarting doesn't
>>> help.
>>>
>>> I have no idea what could be the reason for these hiccups. MC normally
>>> works fine: arrow presses work well, viewing and editing is instant,
>>> but this one thing takes up to 10 seconds - changing directories.
>>> Searching in files has a similar lag, but only once (ie not in every
>>> `chdir` it could have done). In non-mc cygwin usage this issue doesn't
>>> happen.
>>>
>>> The task manager doesn't show any abnormally high CPU or memory usage
>>> on any process. I have `cygserver` running, using `bash` as my shell
>>> and have no fancy `PS1` settings, my `$CYGWIN` is only
>>> `winsymlinks:native`.
>>>
>>> My environment:
>>> * Windows 10 pro 64 bit, up to date
>>> * Not connected to a domain, no network drives
>>> * No anti virus software apart from the one built in Windows
>>> * Two hard drives (system on SSD (C:), D: is a SSHD), quite a few
>>> directory junctions from C: to C:, no loops
>>> * I'm usually using fatty as the terminal, but mintty has the same issues
>>> * GNU Midnight Commander 4.8.17
>>> * cygserver is installed
>>>
>>
>> two ideas to try:
>>
>> - update cygwin package as 2.5.2 versus the 2.5.1 that you are running
>>   has few bug fixes that could change the responsiveness.
>>   (unlike to work but worth to try)
>>
>> - disable the windows anti virus.
>>   Experience in the past with Windows Defender were disappointing
>>   https://cygwin.com/faq/faq.html#faq.using.bloda
>>
>>
>> Regards
>> Marco
>>
>>
>>
>> --
>> Problem reports:   http://cygwin.com/problems.html
>> FAQ:   http://cygwin.com/faq/
>> Documentation: http://cygwin.com/docs.html
>> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
>>
>
>
>
> --
> Pozdrawiam,
> Krzysiek Bociurko
> +48 664 964 967



-- 
Pozdrawiam,
Krzysiek Bociurko
+48 664 964 967

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Midnight Commander is very slow when starting and changing directories

2016-07-08 Thread Krzysztof Bociurko
Disabled windows defender real time and cloud based protection,
restarted Cygwin. No change.

Updating cygwin will have to wait a bit.

2016-07-08 16:49 GMT+02:00 Marco Atzeri :
> On 08/07/2016 16:13, Krzysztof Bociurko wrote:
>>
>> I'm using midnight commander with Cygwin 64 bit on Windows 10 64 bit.
>>
>> After moving to a new machine and a clean reinstall of windows and
>> cygwin, my midnight commander started to get very laggy - starting mc,
>> any change of directory or exiting from finding files (to refresh list
>> of files in the two panes) takes long seconds. Restarting doesn't
>> help.
>>
>> I have no idea what could be the reason for these hiccups. MC normally
>> works fine: arrow presses work well, viewing and editing is instant,
>> but this one thing takes up to 10 seconds - changing directories.
>> Searching in files has a similar lag, but only once (ie not in every
>> `chdir` it could have done). In non-mc cygwin usage this issue doesn't
>> happen.
>>
>> The task manager doesn't show any abnormally high CPU or memory usage
>> on any process. I have `cygserver` running, using `bash` as my shell
>> and have no fancy `PS1` settings, my `$CYGWIN` is only
>> `winsymlinks:native`.
>>
>> My environment:
>> * Windows 10 pro 64 bit, up to date
>> * Not connected to a domain, no network drives
>> * No anti virus software apart from the one built in Windows
>> * Two hard drives (system on SSD (C:), D: is a SSHD), quite a few
>> directory junctions from C: to C:, no loops
>> * I'm usually using fatty as the terminal, but mintty has the same issues
>> * GNU Midnight Commander 4.8.17
>> * cygserver is installed
>>
>
> two ideas to try:
>
> - update cygwin package as 2.5.2 versus the 2.5.1 that you are running
>   has few bug fixes that could change the responsiveness.
>   (unlike to work but worth to try)
>
> - disable the windows anti virus.
>   Experience in the past with Windows Defender were disappointing
>   https://cygwin.com/faq/faq.html#faq.using.bloda
>
>
> Regards
> Marco
>
>
>
> --
> Problem reports:   http://cygwin.com/problems.html
> FAQ:   http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
>



-- 
Pozdrawiam,
Krzysiek Bociurko
+48 664 964 967

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Midnight Commander is very slow when starting and changing directories

2016-07-08 Thread Marco Atzeri

On 08/07/2016 16:13, Krzysztof Bociurko wrote:

I'm using midnight commander with Cygwin 64 bit on Windows 10 64 bit.

After moving to a new machine and a clean reinstall of windows and
cygwin, my midnight commander started to get very laggy - starting mc,
any change of directory or exiting from finding files (to refresh list
of files in the two panes) takes long seconds. Restarting doesn't
help.

I have no idea what could be the reason for these hiccups. MC normally
works fine: arrow presses work well, viewing and editing is instant,
but this one thing takes up to 10 seconds - changing directories.
Searching in files has a similar lag, but only once (ie not in every
`chdir` it could have done). In non-mc cygwin usage this issue doesn't
happen.

The task manager doesn't show any abnormally high CPU or memory usage
on any process. I have `cygserver` running, using `bash` as my shell
and have no fancy `PS1` settings, my `$CYGWIN` is only
`winsymlinks:native`.

My environment:
* Windows 10 pro 64 bit, up to date
* Not connected to a domain, no network drives
* No anti virus software apart from the one built in Windows
* Two hard drives (system on SSD (C:), D: is a SSHD), quite a few
directory junctions from C: to C:, no loops
* I'm usually using fatty as the terminal, but mintty has the same issues
* GNU Midnight Commander 4.8.17
* cygserver is installed



two ideas to try:

- update cygwin package as 2.5.2 versus the 2.5.1 that you are running
  has few bug fixes that could change the responsiveness.
  (unlike to work but worth to try)

- disable the windows anti virus.
  Experience in the past with Windows Defender were disappointing
  https://cygwin.com/faq/faq.html#faq.using.bloda

Regards
Marco



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Midnight Commander is very slow when starting and changing directories

2016-07-08 Thread Marco Atzeri

On 08/07/2016 16:13, Krzysztof Bociurko wrote:

I'm using midnight commander with Cygwin 64 bit on Windows 10 64 bit.

After moving to a new machine and a clean reinstall of windows and
cygwin, my midnight commander started to get very laggy - starting mc,
any change of directory or exiting from finding files (to refresh list
of files in the two panes) takes long seconds. Restarting doesn't
help.




I have also posted this issue to Super User, but after some discussion
with user Matzeri, he suggested for me to go on this list with this
problem. SU link:
http://superuser.com/questions/1097601/midnight-commander-sometimes-very-slow



As mentioned on https://cygwin.com/problems.html

"Run cygcheck -s -v -r > cygcheck.out and include that file as an 
attachment in your report. Please do not compress or otherwise encode 
the output. Just attach it as a straight text file so that it can be 
easily viewed. "


please attach a copy of cygcheck.out

Regards
Marco

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Midnight Commander is very slow when starting and changing directories

2016-07-08 Thread Krzysztof Bociurko
I'm using midnight commander with Cygwin 64 bit on Windows 10 64 bit.

After moving to a new machine and a clean reinstall of windows and
cygwin, my midnight commander started to get very laggy - starting mc,
any change of directory or exiting from finding files (to refresh list
of files in the two panes) takes long seconds. Restarting doesn't
help.

I have no idea what could be the reason for these hiccups. MC normally
works fine: arrow presses work well, viewing and editing is instant,
but this one thing takes up to 10 seconds - changing directories.
Searching in files has a similar lag, but only once (ie not in every
`chdir` it could have done). In non-mc cygwin usage this issue doesn't
happen.

The task manager doesn't show any abnormally high CPU or memory usage
on any process. I have `cygserver` running, using `bash` as my shell
and have no fancy `PS1` settings, my `$CYGWIN` is only
`winsymlinks:native`.

My environment:
* Windows 10 pro 64 bit, up to date
* Not connected to a domain, no network drives
* No anti virus software apart from the one built in Windows
* Two hard drives (system on SSD (C:), D: is a SSHD), quite a few
directory junctions from C: to C:, no loops
* I'm usually using fatty as the terminal, but mintty has the same issues
* GNU Midnight Commander 4.8.17
* cygserver is installed



Here is a strace log, maybe someone has an idea what did go wrong?
http://pastebin.pl/view/9b839815
(recorded with `LOCALE=C strace -q -o /tmp/mc-log mc /tmp`)

In the recorded session I have:

* started mc in `/tmp` directory
* entered `/tmp/NVIDIA Corporation` directory
* went back up (`..`)
* entered `/tmp/mc-chanibal` directory
* went back up (`..`)
* exited with F10

You can see that normalize_posix_path  takes a lot of time, but trying
to force the same call with cygpath fails to take so long (more
later).



Additional timing information:

A find of all directories in my `$HOME` takes 4.6 seconds:

$ time find ~ -type d | wc -l
(snipped two directories without permissions)
19919

real0m4.626s
user0m0.796s
sys 0m3.765s

A `ls -al` on all of these 19919 directories took a lot of time, but
the average was fairly low:

time (find ~ -type d | while read f; do { time ls -al $f; } \
   |& awk '$1 == "real" { printf $2 }'  \
   | awk -Fm '{printf( "%2.4f", $1 * 60 + $2 )}';   \
   echo -e "\t$f"; done \
) >/tmp/ls-time-log ;
(snipped two dirs without permissions)

real12m21.870s
user7m4.576s
sys 16m34.446s

The average time to do an `ls -al` is 0.020s, min is 0.017, max is 0.154:

$ awk 'BEGIN { sum=0; min=; max=0;  minf=""; maxf=""; } \
  $1 { sum += $1;   \
   if(min > $1) { min = $1; minf = $2; };   \
   if(max < $1) { max = $1; maxf = $2; } }  \
  END { print "avg: " sum/NR; print "min: " min " " \
  minf; print "max: " max " " maxf }' http://superuser.com/questions/1097601/midnight-commander-sometimes-very-slow


-- KB

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple