On 30-Dec-2009 Frederic Hardy <[email protected]> wrote: > Hello ! > > I have a problem with patch 274 about syntax highlighting. > > If i'm apply this patch, syntax highlighting become very very very slow > when i'm modifying text in the start of a large fold. > > My OS is FreeBSD 7.1-RELEASE-p9. > [...] > > You will find as attachment to this mail my syntax file and a php file > to reproduce the bug. > > Just put syntax file in you ~/.vim/syntax directory, open the php file > with vim with patch 274, go to line 24 on word "ogoUnitTest" and do > "cw" and insert something. > > All is ok without patch 274, so i'm sure that the problem is in this patch. > > Best regards, > > Fred
I haven't observed the behaviour you describe using the syntax file you attached, but I should note that the fold you at line 24 only has 63 lines, which I wouldn't call large. Perhaps this isn't the file you intended to attach. However, Vim indeed gets very slow if I use the default syntax file and set php_folding=1. This certainly is a consequence of applying the 274 patch, which itself IMHO does not seem to be wrong. The patch causes Vim to update folds in all the lines from the beginning of the modified area to the end of the fold in which the modification is being done. It will take a significant amount of time for large folds but this seems a must if the folds are to be updated correctly. I am afraid the whole problem is an example of what I complained about recently: the slowness of Vim when folding is syntax-based. Speaking of which, this does not seem to be an issue which can be easily solved (at least I am unable to come up with a simple solution): I've been trying to optimise the folding code using a profiler but the results are less than promising. -- Cheers, Lech -- You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php
