Comment #3 on issue 282 by [email protected]: Ruby syntax highlighting w/ either cursorline or relativenumber causes lag from high CPU usage
https://code.google.com/p/vim/issues/detail?id=282

I applied your patch. It doesn't seem that any of the patterns you modified appear in my top 10 slowest. The rubyConstant pattern doesn't seem to match the one in the ruby.vim syntax file, so I'm a little confused.

Before:

  TOTAL      COUNT  MATCH   SLOWEST     AVERAGE   NAME               PATTERN
0.017596 184 0 0.000693 0.000096 rubySymbol []})\"':]\@<!\%(\h\|[^\x00-\x7F]\)\%(\w\| [^\x00-\x7F]\)*[!?]\=:[[:space:],]\@= 0.006892 184 0 0.000156 0.000037 rubySymbol \%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@! 0.001577 188 4 0.000065 0.000008 rubyCapitalizedMethod \%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)*\s*(\@= 0.001533 26 0 0.000109 0.000059 rubyFunction \%([[:space:].]\|^\)\@<=\%(\[\]=\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\| [<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@= 0.001517 248 86 0.000038 0.000006 rubyConstant \%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@! 0.001224 220 36 0.000028 0.000006 rubyKeywordAsMethod \%(\%(\.\@<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|in\| module\|next\|nil\)\> 0.001180 190 6 0.000042 0.000006 rubyConditionalExpression \%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\| \%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\> 0.001140 184 0 0.000030 0.000006 rubyKeywordAsMethod \%(\%(\.\@<!\.\)\|::\)\_s*\%(public\|require\|require_relative\|raise\| throw\|trap\|using\)\> 0.001123 184 0 0.000028 0.000006 rubyFloat \%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\| [1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\> 0.001099 184 0 0.000029 0.000006 rubyKeywordAsMethod \%(\%(\.\@<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|while\|yield\| BEGIN\|END\|__FILE__\|__LINE__\)\>

After:

  TOTAL      COUNT  MATCH   SLOWEST     AVERAGE   NAME               PATTERN
0.026836 278 0 0.000804 0.000097 rubySymbol []})\"':]\@<!\%(\h\|[^\x00-\x7F]\)\%(\w\| [^\x00-\x7F]\)*[!?]\=:[[:space:],]\@= 0.010392 278 0 0.000180 0.000037 rubySymbol \%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@! 0.002325 380 137 0.000038 0.000006 rubyConstant \%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@! 0.002287 284 6 0.000078 0.000008 rubyCapitalizedMethod \%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)*\s*(\@= 0.002259 39 0 0.000118 0.000058 rubyFunction \%([[:space:].]\|^\)\@<=\%(\[\]=\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\| [<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@= 0.001899 332 54 0.000047 0.000006 rubyKeywordAsMethod \%(\%(\.\@<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|in\| module\|next\|nil\)\> 0.001876 287 9 0.000078 0.000007 rubyConditionalExpression \%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\| \%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\> 0.001768 278 0 0.000031 0.000006 rubyKeywordAsMethod \%(\%(\.\@<!\.\)\|::\)\_s*\%(public\|require\|require_relative\|raise\| throw\|trap\|using\)\> 0.001709 278 0 0.000037 0.000006 rubyKeywordAsMethod \%(\%(\.\@<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|while\|yield\| BEGIN\|END\|__FILE__\|__LINE__\)\> 0.001693 278 0 0.000038 0.000006 rubyKeywordAsMethod \%(\%(\.\@<!\.\)\|::\)\_s*\%(not\|or\|redo\|refine\|rescue\|retry\|return\| self\|super\|then\|true\)\>

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

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

Raspunde prin e-mail lui