Open askobara opened 10 years ago
What do you use to profile? I've never profiled vim before. Also, do you have a sample large file you can provide? Most of my scripts lately aren't more than a few dozen lines.
A temporary solution would be to turn off the option for folding class extends//implements lists and function argument lists with b:phpfold_group_args = 0
. That should eliminate any calls to FindPrevClassFunc()
, which seems to be a significant portion..
Your solution works! Thanks!
For profile I use basic commands:
:profile start profile.log
:profile func *
:profile file *
" At this point do slow actions
:profile pause
:noautocmd qall!
File on which I have performance problem is simple Yii config: nested arrays, 400+ lines, a lot of them are strings. Nothing special. If indenting by pieces the difference is not noticeable.
I also ran into a performance issue recently and was using the above commands to profile and I found that the FindPrevClassFunc
and GetPhpFold
functions were called for insane amount of time.
The PHP file that I am using is only about 250 lines but it has lot of table markup in HTML. I will be happy to provide the PHP file if it can aid in debugging the performance issue.
Profile info