color: recompile the file-probing regexes a little faster with REG_NOSUB
When the filename, header-line, and magic regexes are first compiled while reading in the rc files (to check their validity), REG_NOSUB is used, but for some reason this wasn't done when each of these regexes gets recompiled in order to be used. Fix this oversight. It shaves some twenty percent off of each of these regexes' compiling time.master
parent
0122119a44
commit
a19a7820f9
|
@ -120,7 +120,7 @@ bool found_in_list(regexlisttype *head, const char *shibboleth)
|
|||
regex_t rgx;
|
||||
|
||||
for (item = head; item != NULL; item = item->next) {
|
||||
regcomp(&rgx, item->full_regex, NANO_REG_EXTENDED);
|
||||
regcomp(&rgx, item->full_regex, NANO_REG_EXTENDED | REG_NOSUB);
|
||||
|
||||
if (regexec(&rgx, shibboleth, 0, NULL, 0) == 0) {
|
||||
regfree(&rgx);
|
||||
|
|
Loading…
Reference in New Issue