d6c1bac54f7d

Refactor a hot loop.

Results in a ~30% speedup when you have a lot (100+)
of ignore patterns.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 27 Sep 2012 00:38:54 -0400
parents cf6c3851d091
children c4bc191a0127
branches/tags (none)
files ffind

Changes

--- a/ffind	Thu Sep 27 00:00:33 2012 -0400
+++ b/ffind	Thu Sep 27 00:38:54 2012 -0400
@@ -286,8 +286,9 @@
     if options.ignore_vcs_dirs and basename in VCS_DIRS:
         return True
 
-    if any(map(lambda i: i(path), ignorers)):
-        return True
+    for i in ignorers:
+        if i(path):
+            return True
 
     return False