3 ms·
Why would long lines crash editors?
by gnator 9y ago
Why would long lines crash editors?
- pwg 9y agoIf the editor has some built in line length limit then exceeding that limit might lead to a crash (depending upon how the editor is coded).
- gnator 9y agoRight but it looks like (i was able to load it for Atom and Notepad++ but very slow) they perform soft wrap on these long lines
- pwg 9y agoWhich would imply that their soft-wrap algorithm consumes an inordinate amount of time when confronted with a single, 9MB long, line of space characters.
- icebraining 9y agoWell, VIM doesn't crash :) But edge cases in general are where the bugs lurk, and 9MBs of spaces is certainly an edge case. A possible cause might be that they try to render the whole line, try to allocate too much memory, and crash when the allocation fails. Whereas if the file had many lines, they'd probably be smart enough to only render part of it.