Closed sth closed 11 years ago
Thanks for this. I've posted to ack-dev for discussion.
Looks like the Travis tests are failing because I forgot a %{ }
in the to_string()
functions in IsGroup.pm
and ExtensionGroup.pm
.
Sorry it took so long to look at this; I'm a big fan of this patch. It looks solid, and this is definitely the kind of thing we need in ack. @petdance If it's ok with you, I think we should merge this.
Make it so #1
Merged! Thanks for the contribution!
We'd like to credit you in the Changes file and acknowledgements, if you'll give us your name.
Thanks for merging the patch! For the changes file, my name is "Stephan Hohe". Sorry for not responding sooner, but I've been away for a while and rather busy at work :).
Adds an Ack::Filter::Collection class that can contain filters and internally sort them into groups. The groups can then be optimized for faster filtering.
In this patch,
is
andext
filters are grouped and replaced by a fast hash lookup. This leads to improved performance when many such filters are active, like when using the--known
command line option.Only
is:
andext:
filters are affected and usually there aren't enough of them active for these changes to make a difference, but for--known
the speedup is quite significant:The tests also all pass.