Hello !
I can reproduce it with your provided syntax file and my debian vim
7.2.330. I haven't looked into the syntax file in detail, but it seems
to be the problem. Using your syntax php file and layout.php that you
provided[1], this simple_vimrc script shows the problem:

,----
| profile start my_profile_php
| fun Profile()
|   syntax on
|   e layer.php
|   set fdm=syntax
|   "call feedkeys(":set synmaxcol=100\n", 't')
|   call feedkeys(":8d\n",'t')
|   call feedkeys("u",'t')
|   call feedkeys("zo",'t')
|   call feedkeys("dw",'t')
|   call feedkeys(":q!\n",'t')
| endfun
|
| profile func Profile
|
| call Profile()
`----

(Notice, that first deleting the whole fold starting at line 8 and then
undoing the deletion will make vim unresponsive for several minutes:

c...@t41:~$ time vim -u simple_vimrc -U NONE -N
"layer.php" "layer.php" 1595L, 39500C
Press ENTER or type command to continue

real    3m4.249s
user    2m58.199s
sys     0m1.460s
c...@t41:~$

Profiling did not resolve anything special:
FUNCTION  Profile()
Called 1 time
Total time:   0.505644
  Self time:   0.390492

count  total (s)   self (s)
     1   0.079991   0.000270 | syntax on
     1   0.425550   0.390119 | e layer.php
     1              0.000023 | set fdm=syntax
                             | "call feedkeys(":set synmaxcol=100\n", 't')
     1              0.000032 | call feedkeys(":8d\n",'t')
     1              0.000006 | call feedkeys("u",'t')
     1              0.000005 | call feedkeys("zo",'t')
     1              0.000005 | call feedkeys("dw",'t')
     1              0.000005 | call feedkeys(":q!\n",'t')

FUNCTIONS SORTED ON TOTAL TIME
count  total (s)   self (s)  function
     1   0.505644   0.390492  Profile()

FUNCTIONS SORTED ON SELF TIME
count  total (s)   self (s)  function
     1   0.505644   0.390492  Profile()


If you comment out the lines 8 and 7 it works ok:

c...@t41:~$ cat simple_vimrc&&  time vim -u simple_vimrc -U NONE -N
profile start my_profile_php3
fun Profile()
         syntax on
         e layer.php
         set fdm=syntax
         "call feedkeys(":set synmaxcol=100\n", 't')
         "call feedkeys(":8d\n",'t')
         "call feedkeys("u",'t')
         call feedkeys("zo",'t')
         call feedkeys("dw",'t')
         call feedkeys(":q!\n",'t')
endfun

profile func Profile

call Profile()
"layer.php" "layer.php" 1595L, 39500C
Press ENTER or type command to continue

real    0m1.024s
user    0m0.900s
sys     0m0.048s

One thing that helps a little is to set synmaxcol to a much lower value:
c...@t41:~$ cat simple_vimrc&&  time vim -u simple_vimrc -U NONE -N
profile start my_profile_php4
fun Profile()
         syntax on
         e layer.php
         set fdm=syntax
         call feedkeys(":set synmaxcol=100\n", 't')
         call feedkeys(":8d\n",'t')
         call feedkeys("u",'t')
         call feedkeys("zo",'t')
         call feedkeys("dw",'t')
         call feedkeys(":q!\n",'t')
endfun

profile func Profile

call Profile()
"layer.php" "layer.php" 1595L, 39500C
Press ENTER or type command to continue

real    0m23.974s
user    0m23.293s
sys     0m0.216s

BTW: using the debian provided syntax files, does not show the problem:

c...@t41:~$ cat simple_vimrc&&  time vim -u simple_vimrc -U NONE -N
let php_folding=1
profile start my_profile_php6
fun Profile()
         syntax on
         e layer.php
         set fdm=syntax
         "call feedkeys(":set synmaxcol=100\n", 't')
         call feedkeys(":8d\n",'t')
         call feedkeys("u",'t')
         call feedkeys("zo",'t')
         call feedkeys("dw",'t')
         call feedkeys(":q!\n",'t')
endfun

profile func Profile

call Profile()
"layer.php" "layer.php" 1595L, 39500C
Press ENTER or type command to continue

real    0m3.506s
user    0m3.292s
sys     0m0.096s


[1] To make sure, I run this test as a separate user with a new ~/.vim
directory that contains only these files:
c...@t41:~$ find .vim/
.vim/
.vim/syntax
.vim/syntax/php.vim

:scriptnames does show, that some standard plugins are loaded:
   1: /home/cb/simple_vimrc
   2: /usr/share/vim/vim72/syntax/syntax.vim
   3: /usr/share/vim/vim72/syntax/synload.vim
   4: /usr/share/vim/vim72/syntax/syncolor.vim
   5: /usr/share/vim/vim72/filetype.vim
   6: /home/cb/.vim/syntax/php.vim
   7: /usr/share/vim/vim72/syntax/php.vim
   8: /usr/share/vim/vim72/plugin/getscriptPlugin.vim
   9: /usr/share/vim/vim72/plugin/gzip.vim
  10: /usr/share/vim/vim72/plugin/matchparen.vim
  11: /usr/share/vim/vim72/plugin/netrwPlugin.vim
  12: /usr/share/vim/vim72/plugin/rrhelper.vim
  13: /usr/share/vim/vim72/plugin/spellfile.vim
  14: /usr/share/vim/vim72/plugin/tarPlugin.vim
  15: /usr/share/vim/vim72/plugin/tohtml.vim
  16: /usr/share/vim/vim72/plugin/vimballPlugin.vim
  17: /usr/share/vim/vim72/plugin/zipPlugin.vim
Thanks for your help, Christian !
But i don't know where is the problem in my syntax file...
I have no problem with it before patch 274.
And i have no problem with default php syntax file after patch 274, but my custom file is very different, so default syntax file is not relevant to find the problem in my custom syntax file :/.

Best regards,
Fred.

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

Raspunde prin e-mail lui