Hi list,

I noticed that using Vim 7.4a the Vimwiki plugin works measurably slower with 
re=0 than with re=1. I figured out the reason is this regexp in the syntax 
definition:

    
[[:alnum:]]\@<!\%(\%(\%(http\|https\|file\|ftp\|gopher\|telnet\|nntp\|ldap\|rsync\|imap\|pop\|irc\|ircs\|cvs\|svn\|svn+ssh\|git\|ssh\|fish\|sftp\):\%(\/\/\)\)\|\%(mailto\|news\|xmpp\|sip\|sips\|doi\|urn\|tel\):\)\S\{-1,}\%(([^
 \t()]*)\)\=\S*

You may know what it is supposed to match.
Removing some of the branches makes it faster and so does removing  
[[:alnum:]]\@<!

I don't know if there is a standard method for measuring speed of the syntax 
highlight, but here is what I have done:
- open a relatively large file
- :set syn=off
- :syntax match Number 
/[[:alnum:]]\@<!\%(\%(\%(http\|https\|file\|ftp\|gopher\|telnet\|nntp\|ldap\|rsync\|imap\|pop\|irc\|ircs\|cvs\|svn\|svn+ssh\|git\|ssh\|fish\|sftp\):\%(\/\/\)\)\|\%(mailto\|news\|xmpp\|sip\|sips\|doi\|urn\|tel\):\)\S\{-1,}\%(([^
 \t()]*)\)\=\S*/
- scroll with <c-e> and <c-y>
- extremely slow with re=0 but normal slow (*wink*) with re=1

So, can this behavior be considered as a bug?

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui