3 ms·
> Maybe it only worked well because you never encountered a file consisting of one very long line? You correct when you say very long lines are hard to handle,
by jussij 9y ago
> Maybe it only worked well because you never encountered a file consisting of one very long line?
You correct when you say very long lines are hard to handle, but I'm not sure this is because of the internal data structure used.
In this case the internal data structure allocated a line buffer at every node of the double linked list and even on that Win16 environment that allowed for a line size of up to 64 kBytes (i.e. 2^16) in length.
However, to handle tabs correctly the editor is forced to recalculate the column position on every user event and since that calculation has to consider the entire line, the time needed to do this column calculation grows with line length.
So the editor could handled long lines but as the line lengths around 500 characters the speed became noticeably slow.
- eru 9y agoYou could guess the tab handling with some fast method at first, and asynchronously run the proper handling to catch up with a pause in user input a few seconds later.