|Subject:||Slow Windows 10 command interpreter closing|
|Date:||Tue, 8 Aug 2017 03:27:29 -0700|
|From:||"Lance Gropper" <email@example.com>|
I’m running Strawberry Perl 64-bit 126.96.36.199, under Windows 10 Pro Creators Edition build 16257RS3, and am seeing an issue which resembles a memory leak, but I did some more investigating, and here’s what’s happening:
My PERL script goes through the files in a directory, looking for files with specific names, and when it finds them, calls the system move command to move those files one-by-one, into a sub-directory called “a”. There are approximately 30,000 files in the source directory. As this is happening, the available RAM in the system starts decreasing rapidly, and there’s a lot of activity in terms of virtual memory. I opened the resource viewer, and saw several thousand occurrences of cmd.exe – each one taking approximately 3.5MB. When the program finishes, they disappear one-by-one, about one disappearing per second. Similarly, if I Ctrl-C (break) the program, the start disappearing at a slow rate. I think what is going on is Strawberry is creating processes faster than the system can close them, while at the same time, it is either not waiting for the processes to close or the system is closing the processes unusually slowly.