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

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;