about 48% of the time was in repeated calls to File::Basename::parsefile() to figure out the extension of the file being checked. I replaced it with a simple regex and the run-time cut in half.ack foo ~/big-tree-of-source
The slowness is undoubtedly aggravated by how the function needs to know a list of all the suffixes that it should look for. Removing the call to File::Basename::parsefile(), I also got to throw away the code that built the suffix list.
xoxo,
Andy
In reply to File::Basename is dog slow by petdance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |