Forward filtering optimization

This commit is contained in:
Arun Prakash Jana 2018-08-08 05:04:34 +05:30
parent bf36462a2b
commit ca3b27daf2
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 6 additions and 1 deletions

7
nnn.c
View File

@ -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;