Closed oderwat closed 10 years ago
I don't think there's anything you could do directly to improve situation. You could try different terminals to see whether that changes anything. You could also try the pango
frontend.
The absolutely most useful information here would be if you had profiling information for us.
If you're not compiling with -O2
then you should.
If it's Yi itself that's slow, this will probably improve when https://github.com/Fuuzetsu/yi/commits/rope-integration is finished, probably few more days. I think @ethercrow is working on refactoring Vty frontend which might end up helping but I don't think he's going for perfomance.
Actually, I'm profiling slow pasting right now. Looks like input handling in vty library is to blame. Something there is quadratic in length of input characters, when I paste two times more text, this blue bar in thread 5 becomes about four times longer.
The left half of the diagram shows me typing ":set paste", then it hangs for some time and then rapidly shows all the pasted text.
Sorry when I am a bit useless. if you would know how hard it is to get me into Haskell after >20 years of imperative programming you would probably laugh hard. I try to be more helpful eventually.
I always thought Yi was incapable of copying from the system clipboard. I would be happy if you guys can prove me wrong. In vty, I ended up using <Shift><C-v>
in insert mode to paste (and that's slow, as mentioned). In pango, even that's not possible. I never had any success pasting content from the system clipboard using vim's p
or emacs' C-y
.
/cc @coreyoconnor
Without so much as looking at more profiling data I bet the cause is this function:
That function was largely written before my time and was a bit of a mystery. I'm pretty sure the commentary and tests required to assure any changes to that function do not cause regressions are now complete. All that remains is replacing it with something not so slow that still works. Unfortunately, not something I have time for anytime soon. :-\
For now I can only file a bug: https://github.com/coreyoconnor/vty/issues/56
@oderwat try building vty-refactoring
branch with vty-5.2.3, it has some performance improvements.
Performance improvements are now in master.
I noticed that doing a paste from the system clipboard into YI (vim insert mode) running inside an OSX Terminal Windows is extremely slow ... as in horrible extremely slow.
Is there something I do wrong or could do better?