On Mi, 03 Mai 2017, Kelvin Lawrence wrote: > So I ran two sets of profile data. One with syntax turned off and one with > syntax turned on. In both cases the opening of a new line took a long time. > With Syntax off it took around 12 seconds. With Syntax on it took > considerably longer. Neither was ideal. Here are the respective sets of > results. It seems almost all of the time is spent in GetRubyIndent() and > GetMSL(). Note that if I open a line near the start of this huge array things > are a lot faster than if I do it near the end. It is the tracking back up the > array that seems to be relevant here. > > WITH SYNTAX OFF > FUNCTIONS SORTED ON TOTAL TIME > count total (s) self (s) function > 1 11.429995 0.000433 GetRubyIndent() > 1 11.428750 2.905020 <SNR>31_GetMSL() > 242303 6.722091 5.662566 <SNR>31_Match() > 40382 1.802138 1.301368 <SNR>31_PrevNonBlankNonString() > 121145 1.560333 <SNR>31_IsInStringOrComment() > 6 0.000524 <SNR>18_Highlight_Matching_Pair() > 1 0.000281 0.000255 <SNR>31_ExtraBrackets() > 1 0.000113 <SNR>19_LocalBrowse() > 1 0.000011 <SNR>31_IsInStringOrDocumentation() > 1 0.000008 <SNR>31_IsInString() > > > WITH SYNTAX ON > FUNCTIONS SORTED ON TOTAL TIME > count total (s) self (s) function > 2 380.583226 0.000717 GetRubyIndent() > 2 380.576016 7.012970 <SNR>28_GetMSL() > 242281 355.479600 <SNR>28_IsInStringOrComment() > 80761 333.381260 3.834304 <SNR>28_PrevNonBlankNonString() > 484588 40.187259 14.255150 <SNR>28_Match() > 67 0.011742 <SNR>18_Highlight_Matching_Pair() > 1 0.008798 0.003935 <SNR>10_LoadFTPlugin() > 1 0.005508 0.001476 <SNR>5_SynSet() > 2 0.001664 0.001185 <SNR>8_BMMunge() > 1 0.001389 0.001338 <SNR>11_LoadIndent() > 1 0.001269 0.000272 <SNR>8_BMAdd() > 1 0.001183 0.000353 <SNR>8_BMRemove() > 10 0.001163 <SNR>19_LocalBrowse() > 1 0.000996 0.000128 <SNR>8_BMFilename() > 2 0.000521 0.000316 <SNR>28_ExtraBrackets() > 2 0.000479 <SNR>8_BMTruncName() > 15 0.000417 <SNR>27_map() > 2 0.000144 <SNR>28_IsInString() > 22 0.000064 <SNR>26_foldable() > 1 0.000042 <SNR>27_build_path()
Thanks that clears things up. The problem is clearly the indent script. You can work around it by temporarily disabling it `:setl indentexpr=` You might want to report this findings to the upstream repository: https://github.com/vim-ruby/vim-ruby and it looks like there is already an issue for: https://github.com/vim-ruby/vim-ruby/issues/287 Best, Christian -- Gestorbne Freunde sind Ketten, die uns von der Erde ziehen und fester mit einer bessern Welt verknüpfen. -- Jean Paul -- -- 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.