aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-08-08 05:04:34 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-08-08 05:04:34 +0530
commitca3b27daf2a147ce944d90f13f4e4535f0696874 (patch)
tree2e9504b55d50867f972ca15ea97a4ba35239ef65
parentbf36462a2b2141d0454d13d98074ce4e7e706fd1 (diff)
downloadnnn-ca3b27daf2a147ce944d90f13f4e4535f0696874.tar.gz
Forward filtering optimization
-rw-r--r--nnn.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nnn.c b/nnn.c
index 5975040..4d69047 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;