de
de copied to clipboard
Delete (and Insert?) code is O(n^2)
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.