diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-14 22:33:51 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-14 22:33:51 +0200 |
commit | 44c71db7711e3faa7d94ed4b5f32985563e7e494 (patch) | |
tree | e90e50b9929af35b2a7cfe4c1894ab5e9b607ea6 /src | |
parent | 1612b1abe77c0cfff7d9d8f6e8b1b96b6f412546 (diff) | |
download | vim-44c71db7711e3faa7d94ed4b5f32985563e7e494.zip |
updated for version 7.3.1194
Problem: Yaml highlighting is slow.
Solution: Tune the estimation of pattern failure chance.
Diffstat (limited to 'src')
-rw-r--r-- | src/regexp_nfa.c | 14 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 7a335336d..5414465b5 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -4686,6 +4686,18 @@ failure_chance(state, depth) /* empty match works always */ return 0; + case NFA_START_INVISIBLE: + case NFA_START_INVISIBLE_FIRST: + case NFA_START_INVISIBLE_NEG: + case NFA_START_INVISIBLE_NEG_FIRST: + case NFA_START_INVISIBLE_BEFORE: + case NFA_START_INVISIBLE_BEFORE_FIRST: + case NFA_START_INVISIBLE_BEFORE_NEG: + case NFA_START_INVISIBLE_BEFORE_NEG_FIRST: + case NFA_START_PATTERN: + /* recursive regmatch is expensive, use low failure chance */ + return 5; + case NFA_BOL: case NFA_EOL: case NFA_BOF: @@ -5264,7 +5276,7 @@ nfa_regmatch(prog, start, submatch, m) skip_lid = nextlist->id; #endif } - else if(state_in_list(thislist, + else if (state_in_list(thislist, t->state->out1->out->out, &t->subs)) { skip = t->state->out1->out->out; diff --git a/src/version.c b/src/version.c index 7ca5094f8..0b88903fe 100644 --- 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 */ /**/ + 1194, +/**/ 1193, /**/ 1192, |