gchp/iota

slow character deleting

rofrol opened this issue · 7 comments

in emacs or vi style.

Tested under ubuntu 14.10 inside virtualbox on windows 7

gchp commented

I was just in the middle of logging an issue for this 😄

What I'm seeing is some slowness in moving the cursor around after inserting/deleting some text. There is also slowness in inserting/deleting text after moving the cursor around a bit.

To reproduce:

  1. Open a file and move the cursor down a few lines
  2. Insert / Delete a few characters
  3. Try to move the cursor (holding down arrow keys works best) and see the delay in movement
  4. Try insert / delete chars again - note same slowness as in 3

@crespyl is also seeing this. @rofrol is that what you're seeing too?

@dlaronson could this be due to the gap in the gapbuffer having to move to the correct place?

And it looks like there's a memory leak too when you do that. I deleted a few chars and pressed the right arrow for about 60 seconds and iota is now using > 2gb of memory.

gchp commented

Seems like termbox is leaking a little, which could cause some issues, but the main cuplrit here is gapbuffer which is leaking a lot.

I've submitted a fix for the Termbox leak at nsf/termbox#45.

We've tracked down the leak in GapBuffer, and someone will fix it shortly.

gchp commented

Logged a ticket here: withoutboats/gapbuffer#8

I fixed GapBuffer (had a second minor commit that is waiting for review) after which I will commit updating Cargo.toml, and pull request #87 can be merged.