lcd047 wrote:

> On 14 June 2013, Ben Fritz <[email protected]> wrote:
> > On Friday, June 14, 2013 7:58:48 AM UTC-5, Christian Wellenbrock
> >   wrote:
> > > I attached a yaml file as example. Please open it with vim to test
> > > the highlighting speed. Scolling and searching is very slow. Tested
> > > on vim 7.3.1106
> > 
> > 1106 is very old news for the new regex engine. At that point Bram was
> > still implementing basic functionality. All the speed improvements
> > came later. Please try again with 1189 or later.
> 
>     With 7.3.1188 highlighting is still >10 times slower with the re=0
> compared to re=1.  FWIW.
> 
>     /lcd
> 
> 
> re = 0:
> =======
> 
>   TOTAL      COUNT  MATCH   SLOWEST     AVERAGE   NAME               PATTERN
>   0.131778   463    0       0.000444    0.000285  yamlFloat          
> \%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(\%(\d[0-9_]*\)\.[0-9
>   0.128999   463    0       0.000414    0.000279  yamlInteger        
> \%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(0\%(b[0-1_]\+\|[0-7_

I found a way to make these two faster.

>   0.081751   746    716     0.000151    0.000110  yamlPlainScalar    
> \%([\-?:,\[\]{}#&*!|>'"%@`]\@!\%(\%([\n\r\uFEFF \t]\)\@!\p

This pattern is just crazy...  And it matches nearly everywhere.


-- 
hundred-and-one symptoms of being an internet addict:
205. You're constantly yelling at your spouse, family, roommate, whatever,
     for using the phone for stupid things...like talking.

 /// 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.


Raspunde prin e-mail lui