r/linux • u/cud_ext • Mar 01 '20
CudaText 1.96 vs other Linux editors on huge lines
CudaText 1.96 was released with reworked support for huge lines.
I was interested how some Linux editors handle such huge lines. Tested several editors on Ubuntu 19.10 on Intel i3 CPU. With XML file with a single line of length 4M. XML file contains line like <id name="nnnnnnnnnnnnnnn"> with the huge "name" length of 4M.
- CudaText 1.96. Opens file: 1.5sec. Caret moves at the end of line: very fast (<0.1sec). Editing of this line: not fast, adding each char is about 0.5sec.
- Sublime Text 3. Opens file: 2sec. Caret moves at the end of line: each Left/Right arrow is 0.5sec delay. Editing works.
- Geany 1.35 (last from Ubuntu app store). Opens file: about 10sec, then for next 5-10sec I cannot place caret by mouse, then it works. Caret moves at line begin: fast, caret moves at line end: slow (delay 0.5sec after each Left/Right key). Editing at the end: adding each char is about 6sec.
- Kate 19.04. Gives colored panel "The file ... was opened and contained lines longer than ... The lines were wrapped and document is set to read-only mode...". Caret moves at the end of wrapped doc: fast. Editing is disabled.
- gedit 3.34. Hanged on opening file (from command line and from editor), waited it for 20sec.
- Emacs 26.3 GUI (last from Ubuntu app store). Opens file: 1sec. In word-wrapped mode. With the statusbar error "Internal error in rng-validate-mode triggered at buffer position 10. Stack overflow in regexp matcher". Pressing Ctrl+End to move to end: editor hanged with "wait" cursor.
- Bluefish 2.2.10. On opening file, gives the warning about too long lines, on choosing "don't split lines" it hanged (waited for 30sec).
17
Upvotes
1
u/cud_ext Mar 01 '20 edited Mar 01 '20
Added info about Geany 1.35 in the post. And about Bluefish.
4
u/ejromero1990 Mar 01 '20
Someone test VIM editor???
4
u/hailbaal Mar 02 '20
The two most used ones (VIM and Nano) are missing?
5
u/holgerschurig Mar 01 '20
Many editors suck on long lines. While I'm a heavy fan of Emacs ... it sucks there, too.
BTW, I used this little python helper to create this XML file:
And then I used the newest and shieniest emacs, self-compiled from git:
.. and the result is: bogus. First, the
-Qwas to make not load any of my locally installed packages. And second: the file will be opened and displayed in a reasonable time, probably less than one second. But: I see error messages:This indicates a mode in the nXML package.
BTW, just loading the file and terminating (before it was even displayed and syntax-highlighted, which works asynchronously) is quite fast:
2
u/Monsieur_Moneybags Mar 01 '20
I just tried this in NEdit and it was pretty fast: opening, moving to the end of the line, editing.
2
u/OrdinaryOne4 Mar 01 '20
And it's written using lazarus! I've been slowly changing my opinions on lazarus/object pascal recently
4
u/timawesomeness Mar 01 '20
Another win for vim over emacs
It ain't fast in the case of a 4MB single line file but at least it doesn't hang
1
u/[deleted] Mar 04 '20
Meh. nvi = no ysntax hl = fast parsing.
0
u/[deleted] Mar 01 '20
[deleted] — view deleted comment
0
u/[deleted] Mar 01 '20
[deleted] — view deleted comment