On Friday, June 7, 2013 2:29:48 PM UTC-5, Dominique Pelle wrote: > TOTAL COUNT MATCH SLOWEST AVERAGE NAME PATTERN > > 3.234792 47684 0 0.002802 0.000068 xmlSyncDT > > \_.\(<!DOCTYPE\)\@= > > [Snip] > > > Clearly the top regexp (xmlSyncDT) stands out even > > if its executed less times than other regexps. >
This match is inefficient because it tries a match everywhere, even on line endings. Really it only ever will match fully in one place. This is a sync match, therefore separate from the normal syntax matches. If I'm reading the help right, I *think* this means normal syntax can match over the top of it as if it were not even there. So there should be no problem with matching <!DOCTYPE directly instead of matching the character before it with a "match everything" pattern. Even better would be to adjust the start offset to just before the text using a match offset. -- -- 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.
