From 66e83d7db05152d0fe0e1c1ae42576be77ef18e3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 21 May 2013 14:03:00 +0200 Subject: [PATCH] updated for version 7.3.988 Problem: New regexp engine is slow. Solution: Break out of the loop when the state list is empty. --- src/regexp_nfa.c | 5 +++++ src/version.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index ba3a0f492..8a0c2614a 100644 --- 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 index e274ae808..8931d1d9e 100644 --- a/src/version.c +++ b/src/version.c @@ -728,6 +728,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 988, /**/ 987, /**/ -- 2.50.1