de icon indicating copy to clipboard operation
de copied to clipboard

Delete (and Insert?) code is O(n^2)

Open driusan opened this issue 9 years ago • 0 comments

There's various places in the editing code that do things like newBuffer := make([]byte, size) copy(newBuffer, oldBuffer) copy(newBuffer[start:], stuff) copy(newBuffer[end:], oldBuffer[offset:])

to insert or delete from the middle of a buffer. It's been pointed out that this is quadratic.

This isn't an issue or even noticeable for average-sized source code files, but is going to be an issue for editing very text files.

driusan avatar May 22 '16 15:05 driusan