mawww / kakoune

mawww's experiment for a better code editor
http://kakoune.org
The Unlicense
9.75k stars 709 forks source link

iTerm2 slows down kakoune #1307

Open zgrep opened 7 years ago

zgrep commented 7 years ago

I find that in iTerm2, there's a noticeable delay between when I type on my keyboard, and when the result happens on the screen. This does not happen with the built-in Terminal app.

mawww commented 7 years ago

I dont have any Mac available to me, so I cannot debug that, but I'll be interested in any additional informations.

One thing you could do is to run the set global debug profile command, and take a look in the *debug* buffer for any timings that could look off.

casimir commented 7 years ago

I don't have this problem (iTerm 3.0). Are you using tmux are another multiplexer?

lenormf commented 7 years ago

Here is the conversation that resulted in this issue being created:

zgrepc  For some reason, kakoune suddenly started feeling just a tad slower than other editors... just enough to be annoying. :S
 *      zgrepc tries updating
zgrepc  Nope. It just feels... that little bit less snappy than vim. Then again, it is doing more (autocomplete, et cetera), but... :(
ironzorg        zgrepc: what's your modeline look like
ironzorg        how many hooks do you have
ironzorg        is it better if you run `kak -n`
zgrepc  Uh, nothing other than the default configuration for now. I'm still trying to get used to kakoune.
zgrepc  No, it's not really better with kak -n .
zgrepc  Hm...
ironzorg        oh that's weird
ironzorg        is it slower all the time, or only if you're doing something in particular
ironzorg        are you trying to edit 10MB files
zgrepc  No.
zgrepc  It's slower all the time. I think it might just be something to do with the many things I have open at the moment.
 *      zgrepc closes some tabs
ironzorg        is your system swapping hard at the moment?
ironzorg        what system are you using
zgrepc  macOS, and it shouldn't be swapping hard, or soft, my memory usage doesn't seem high enough for that...
zgrepc  (then again, who knows what it does. ._.)
ironzorg        what terminal are you using
zgrepc  No, there's still that... delay.
zgrepc  iTerm2.
ironzorg        are you using `tmux` or something similar
zgrepc  Oh, hm. It's not there with Terminal. Weird.
zgrepc  Now the question is why is iTerm2 making things slower.
ironzorg        are you using a multiplexer
zgrepc  Not willingly.
zgrepc  And not with my knowledge.
ironzorg        ok so no
zgrepc  Well, I don't know what iTerm2 does. It must be doing something.
ironzorg        can you please create an issue describing the symptoms, and names and versions of the things you're using (system, terminal) please ?
ironzorg        I don't run mac but maybe somebody that does will have an answer
zgrepc  Sure.
ironzorg        cheers
zgrepc  Thanks. :)
zgrepc  Hm. If I manage to get Terminal to switch tabs instead of windows with cmd+number, then I'd happily use that.
ironzorg        you could use `tmux`
ironzorg        https://danielmiessler.com/study/tmux/
zgrepc  Huh. kakoune via tmux seems to, uh, stop escape from working.
ironzorg        no it's `tmux` waiting a little longer, you can fix it by adding the following to your ~/.tmux.conf
ironzorg        set -sg escape-time 25
zgrepc  Oh. I see.
ul commented 6 years ago

I observe significant lag on large monitor when using kakoune inside tmux, independent of terminal emulator. Paradoxically, in iTerm2 in that particular situation lag is less than in Alacritty, which is insanely fast in any other scenario. For example, if I run kakoune outside of tmux, it's very responsive in Alacritty and still so-so in iTerm2. I suspect it's a bug in tmux, and iTerm2 has some workaround for it.

ul commented 6 years ago

FYI today I tried kakoune inside tmux inside https://github.com/kovidgoyal/kitty — and it runs much smoother than any alternative on both 4k monitor and laptop monitor.

lenormf commented 3 years ago

Is the issue still reproducible?