# HG changeset patch # User Bram Moolenaar # Date 1369137780 -7200 # Node ID 035fb0d5e7ce67eaff19a6cadb37b57c0c25a36b # Parent a720548104ea6b65d2512f46fa7aa74111eed158 updated for version 7.3.988 Problem: New regexp engine is slow. Solution: Break out of the loop when the state list is empty. diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -2951,6 +2951,11 @@ again: #ifdef NFA_REGEXP_DEBUG_LOG fprintf(debug, "\n-------------------\n"); #endif + /* + * If the state lists are empty we can stop. + */ + if (thislist->n == 0 && neglist->n == 0) + break; /* compute nextlist */ for (i = 0; i < thislist->n || neglist->n > 0; ++i) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 988, +/**/ 987, /**/ 986,