2 ms·
These are good points, but a thing to keep in mind is that we were discussing how to update the internal buffer data structure, not refreshing the screen. Howe
by kragen 7y ago
These are good points, but a thing to keep in mind is that we were discussing how to update the internal buffer data structure, not refreshing the screen. However, you could imagine peeking into the keyboard buffer so as to do a batch-insert if several keystrokes happened while you were doing the memmove(), so that the next memmove() would insert two or three bytes instead of just one — then at least it wouldn't progressively fall further behind your keystrokes.
All else being equal, though, I think a source-code editor that can comfortably handle a 48-kibibyte source file is considerably superior to one that can only handle, say, 10 or 20 kilobytes before it starts getting sluggish. Searching works better, refactoring is easier, you need less header files in C, and you can split and join source files a lot less often. Note that qe.c itself is (barely) over 20 kilobytes, and that's using TAB characters for compression.