From: Arun Prakash Jana Date: Tue, 7 Aug 2018 23:34:34 +0000 (+0530) Subject: Forward filtering optimization X-Git-Tag: v1.9~8 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ca3b27daf2a147ce944d90f13f4e4535f0696874;p=nnn.git Forward filtering optimization --- diff --git a/nnn.c b/nnn.c index 59750404..4d69047a 100644 --- a/nnn.c +++ b/nnn.c @@ -1158,7 +1158,12 @@ filterentries(char *path) wln[len] = (wchar_t)*ch; wln[++len] = '\0'; wcstombs(ln, wln, REGEX_MAX); - ndents = total; + + /* Forward-filtering optimization: + * - new matches can only be a subset of current matches. + */ + /* ndents = total; */ + if (matches(pln) == -1) continue;