Closed stormherz closed 6 years ago
Confirmed, I get this as well. After disabling everything in the highlighting code I could think of, Vim is still slow to work in a file containing a long line.
I tried pasting the same line in a .js
file and that yielded abysmal editing speeds, too.
It seems like Vim is just too slow with very long lines.
Can you confirm if you are experiencing similar issues editing long lines using a different syntax, e.g., XML?
Hm, tried with js and xml - vim is getting slower, yes, but not that much, the usual slowness =) I don't think there is a underlying bug indeed in php.vim, because, yeah, we all now how vim terribly handles long lines when highlighting is involved, just thought to let you know that with enabled php.vim editor is getting slower in php files, but that can be subjective, I guess. And it's just a bad practice to have such long lines in code anyway =)
I've tested it with other syntax plugins but none of those slows vim down as much as this plugin does. I do believe there is a lot to be optimized in this plugin.
@Techwolf12 I agree.
The culprit seems to be #68 phpHereDoc regexp. If you set this in vimrc
, editing becomes fast again:
let php_html_load=0
let php_html_in_heredoc=0
let php_html_in_nowdoc=0
let php_sql_query=0
let php_sql_heredoc=0
let php_sql_nowdoc=0
Use #68 to continue the discussion.
I was having heavy performance issues and overall slowness in my php files so I've excluded plugins one by one to pinpoint the cause of it. After disabling php.vim everything came back to normal.
Here is a sample file, which is very slow in opening and moving around on my machine with plugin enabled:
My envirnoment: VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 12 2017 03:04:35) MacOS X 10.12.2 (16C67) Included patches: 1-172
Let me know if you need profiling logs or anything like that =)