Well, taking out the no_chdir option would probably make it run faster and use less memory. But I'd be more suspicious of Win32::Perms having a leak than File::Find, mostly just because Win32::Perms has tons of "Perl written in C code" and that is notorious for being complicated enough that the author doesn't get the reference counts correct, even if the author of this module is rather highly regarded.
So you have two experiments you can run immediately. Run the script as-is again and watch its memory consumption (running any Perl script on a system with little virtual memory if probably not a good idea, BTW) long enough to figure out about how fast it grows. Then kill it and rerun it with no_chdir turned off and then with the use of Win32::Perms commented out. Compare the rate at which memory consumption grows.
BTW, you want to look at the growth of VM usage and most tools will prefer to show you "working set size". For example, if using Windows Task Manager (taskmgr), then select View then Select Columns... then check Virtual Memory Size.
- tye (but my friends call me "Tye")In reply to (tye)Re: Virtual memory issue with File::Find?
by tye
in thread Virtual memory issue with File::Find?
by OzzyOsbourne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |