Dominique Pelle wrote:
> Bram Moolenaar <[email protected]> wrote:
>
> > Mike Williams wrote:
> >
> >> > [...]
> >
> > Thanks for looking into performance. Please redo your measurements with
> > all the recent patches. Depending on the pattern they can make a large
> > impact.
>
>
> Here are profiling results using Linux perf tools, with
> Vim-7.3.1144 and its runtime files, compiled with
> -O0 to avoid inline, using regexpengine=0 and
> the same grammar.xml as earlier in this discussion.
>
> $ perf record vim -c ':$' -c :redraw -c :q grammar.xml
> $ perf report
>
> 19.31% vim vim [.] nfa_regmatch
> 16.92% vim vim [.] addstate
> 7.00% vim vim [.] syn_current_attr
These are not very interesting. gprof shows more info.
> Since most of the time is in nfa_regmatch and addstate,
> I ran gcov to see what lines gets most executed most
> times, but I did not find anything interesting.
>
> More interesting, is the output of...
>
> :syntime on
> CTLRL-L
> CTRL-L
> :syntime report
>
> TOTAL COUNT MATCH SLOWEST AVERAGE NAME PATTERN
> 3.234792 47684 0 0.002802 0.000068 xmlSyncDT
> \_.\(<!DOCTYPE\)\@=
The XML syntax has some very expensive patterns. And this one is
terrible. \_. matching anything, including line breaks, so it does a
recursive match for <!DOCTYPE everywhere...
Note that the new regexp engine is much better. The old engine would
come to a grinding halt on long lines.
I would appreciate it if someone can rewrite the XML syntax.
Tip: when using :syntime, try prepending \%#=1 to see what would happen
with the old regexp engine.
--
hundred-and-one symptoms of being an internet addict:
106. When told to "go to your room" you inform your parents that you
can't...because you were kicked out and banned.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.