Syntax highlighting the attached file spends (on my computer) 72 seconds processing the unanchored yamlBlockMappingKey pattern. With 'set re=1', it only takes .23 seconds.
Applying the below patch reduces the time with 'set re=0' to .01 seconds, but I'm not familiar enough with YAML's syntax to know if that breaks something. diff --git a/runtime/syntax/yaml.vim b/runtime/syntax/yaml.vim --- a/runtime/syntax/yaml.vim +++ b/runtime/syntax/yaml.vim @@ -108,9 +108,7 @@ syn match yamlFlowMappingMerge /<<\ze\s*:/ contained nextgroup=yamlKeyValueDelimiter syn match yamlBlockCollectionItemStart '^\s*\zs-\%(\s\+-\)*\s' nextgroup=yamlBlockMappingKey,yamlBlockMappingMerge -execute 'syn match yamlBlockMappingKey /^\s*\zs'.s:ns_plain_out.'\ze\s*:\%(\s\|$\)/ '. - \'nextgroup=yamlKeyValueDelimiter' -execute 'syn match yamlBlockMappingKey /\s*\zs'.s:ns_plain_out.'\ze\s*:\%(\s\|$\)/ contained '. +execute 'syn match yamlBlockMappingKey /\%(^\s*\|\s\+\)\zs'.s:ns_plain_out.'\ze\s*:\%(\s\|$\)/ '. \'nextgroup=yamlKeyValueDelimiter' syn match yamlBlockMappingMerge /^\s*\zs<<\ze:\%(\s\|$\)/ nextgroup=yamlKeyValueDelimiter syn match yamlBlockMappingMerge /<<\ze\s*:\%(\s\|$\)/ nextgroup=yamlKeyValueDelimiter contained Cheers, -- James GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <james...@jamessan.com>
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDt1yXmf0u+/gno4b5h4iTz2a5XmdsLbs73CT8/9t9cSV6Iv+JQulXlrwPrHcMAaJnPVDsmT1MQYBf+mz+/gj4nhdmf8kD3ZzFCLjXV44xK3J1iUNJ8H6GcLZBNl81L1/Ls00+T7NzdcusXhq8bImiWVzo/ey8BSArM5snNfITypqndF6o5h77U/WISt/wnVUqBMiKL63xUkCsBeHF7qRV0W19/DxYWohIvau0xi6RggRe9GUPtjWcULQigdZR1PkfZcM+DOVc1vsN8oEcj5BP00eyt+N97L6tCKi+rDO5qjCSUAXnjDwOeDVIaAukNqiicXLGMur7eYs1XSD68dJbNg4blchbNH4cnaZjnhm93ODVxom4gjE44544SyhDdfIoKnuI5QnY04wljmVO3HHtMmYD+YtMmttxQFJtFDfw80HA/5JZi544kT79CSbG4NoQRGpoL4KvJFzVfGph0sbI2lz3dptuLdVH4a1NPjwgp58vjl9R91q972D9+O73b8Jlks322FEYCRAdJiCID+0Do/zFvxMc/wj47vz+3IKMsTKCcNG3ak5ecCJdVJWfj2MyW4QCN32viv/cpmwaYbPr2ozlLH9ebdokpViQCpthjwKIgsONM131vUGzEaCOpJ25xAFs+bSAVwMnHj3RdTlaPoSpWSXuNBXwW+O9OTeW/cQ== jamessan@cerberus
signature.asc
Description: Digital signature