Skip Menu |

This queue is for tickets about the Dist-Zilla-Plugin-Perltidy CPAN distribution.

Report information
The Basics
Id: 91288
Status: resolved
Priority: 0/
Queue: Dist-Zilla-Plugin-Perltidy

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.13
Fixed in: (no value)



Subject: Abysmal performance if built directory trees exist

I've had this problem for ages, and I've usually gotten around it by calling

   dzil clean

prior to
 
   dzil perltidy

The issue however, is that it needlessly traverses all of the following and attempts to tidy them:

$PROJECTROOT/.build/*   # Created when `dzil test` fails
$PROJECTROOT/Dist-Name-SOMEVERSION*/    # created after dzil build

 

There doesn't seem to be an obvious way to exclude traversal of these directories, and they're disposable, so any tidying that occurs there is wasted effort.

Not to mention, those directories have about 5x as many files as the source tree itself, so including those directories in perltidy means the more tests you run, or the more builds you let accumulate, the slower it gets.

Now granted, the second of these two might be hard to match against, because "distname-VERSION" is likely to be ambiguous.

I've been however reason ably successful in a similar tool here:

https://metacpan.org/source/KENTNL/Dist-Zilla-PluginBundle-Author-KENTNL-2.007000/utils/strip_eol.pl

Though on second thoughts, the ^[A-Z]  should be expanded to ^[A-Za-z] , or something like that. It was just a convenient heuristic for me because I know that I will for sure start most dists with a capital letter.

Yes. that's quite reasonable. I'll copy the code and apply it in next few days. Thanks On Mon Dec 09 23:07:29 2013, KENTNL wrote: Show quoted text
> I've had this problem for ages, and I've usually gotten around it by > calling > > dzil clean > > prior to > > dzil perltidy > > The issue however, is that it needlessly traverses all of the > following and > attempts to tidy them: > > $PROJECTROOT/.build/* # Created when `dzil test` fails > $PROJECTROOT/Dist-Name-SOMEVERSION*/ # created after dzil build > > There doesn't seem to be an obvious way to exclude traversal of these > directories, and they're disposable, so any tidying that occurs there > is wasted > effort. > > Not to mention, those directories have about 5x as many files as the > source > tree itself, so including those directories in perltidy means the more > tests > you run, or the more builds you let accumulate, the slower it gets. > > Now granted, the second of these two might be hard to match against, > because > "distname-VERSION" is likely to be ambiguous. > > I've been however reason ably successful in a similar tool here: > > https://metacpan.org/source/KENTNL/Dist-Zilla-PluginBundle-Author- > KENTNL-2.007000/utils/strip_eol.pl > > Though on second thoughts, the ^[A-Z] should be expanded to ^[A-Za-z] > , or > something like that. It was just a convenient heuristic for me because > I know > that I will for sure start most dists with a capital letter.
Sorry for late. a new version is shipped. Thanks