You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please let me know the pre-condition (OS, Vim version) and how to reproduce it if you're still interested in this plugin. Otherwise I will close this issue since I cannot investigate further.
Switched to google/vim-codefmt for a while, but wanted to come back to this plugin. Culprit in my case seems to have been foldmethod=syntax, please see investigation below.
Using my casual +10k lines C-file, I started the profiler to see what took time:
FUNCTIONS SORTED ON TOTAL TIME
count total (s) self (s) function
1 17.694369 16.049015 clang_format#replace()
1 1.645128 0.003329 clang_format#format()
1 1.641716 0.000726 <SNR>74_system()
...
In clang_format#replace(), the call to setline(1, splitted) took about 16s.
By installing Konfekt/FastFold, the time spent in clang_format#replace() went down to 0.006350s.
If I understand correctly, google/vim-codefmt does replace the buffer too (maktaba#buffer#Overwrite()), but in my case I ended up using the python implementation to work on the diff-chunk, avoiding their call to setline().
slow problem when the source file was long/big.
for example: any source file 1000+ lines
The text was updated successfully, but these errors were encountered: