3 ms·
In my text editor, I just use a doubly linked list of lines, instead of a rope. It doesn't limit the performance in any situation I've found. A performance prob
by abainbridge 7y ago
In my text editor, I just use a doubly linked list of lines, instead of a rope. It doesn't limit the performance in any situation I've found. A performance problem I do have is large column mode edits. eg if I want to delete the first columns of the entire file (typically some log file with timestamps at the start). I suspect the rope data structure would make that worse.
I like the simplicity of the doubly linked list of lines. I'm not sure what advantage the rope data structure would bring.
- wruza 7y agoI think that ring buffers as lines could do a little speedup in that specific case and shift/unshift ops.
- PeterisP 7y agoDoubly linked list of lines tends to be slow on, for example, editing documents with very long "lines" e.g. doing a find/replace on a 10mb json that's not pretty-printed and is a single line.