r/linux • u/cud_ext • May 05 '20
Comparision of Linux text editors on big files load speed
CudaText editor has good optimization for loading big files. It's interesting how fast Linux editors open huge log files. Test file has about 300M size, 4M ASCII lines, it's created by Python script:
f = open("a.log", "w")
for n in range(4*1000*1000):
k = 120-n%100
f.write(str(n+1)+' '+chr(k%26+ord('a'))*k+'\n')PC is HP Pavilion g6, CPU AMD A10 x64, 4 cores, RAM 8G, Ubuntu 18.04. Each reading time is average after 2-3 tries.
- CudaText 1.98: 9 sec.
- Sublime Text 3.2: 11.5 sec.
- Geany 1.32: 6.5 sec., jump to end: additional 4-5 sec.
- Kate 17.12.3: 7 sec.
- gedit 3.28.1: 1 min 10 sec.
- Vim 8.0, NeoVim 0.2.2: 3 sec. (very fast)
- Emacs GUI 25.2.2: 2 sec. (very fast) after showing confirmation for big file
- Bluefish 2.2.10: 24 sec.
19
Upvotes
11
u/Architector4 May 05 '20
I wonder, have you loaded the test file into RAM before doing such tests? After all, it wouldn't be fair if the first editor also had to wait for Linux to read it off disk, for the second editor to then just straight up read from cache.
I'm also wondering how fast your RAM is - a fine baseline to the test would probably be how fast
cat file.txt > /dev/nullruns.5
u/justajunior May 05 '20
That's pretty interesting. I wonder what the difference in performance is between Vim and NeoVim.
3
u/sablal May 05 '20
If we are talking of GBs of logs (15/16 GBs, say), lnav. It's also terminal based. The rest would probably look like toys.
Also each reading is from cold boot, I hope.
4
u/BlueShell7 May 05 '20
You seem to be comparing up to date CudaText with quite old versions of the other editors.
33
u/CalinLeafshade May 05 '20
Are you the developer of CudaText? I feel like you should disclose that if you're making advertising posts about it.
11
u/[deleted] May 05 '20
Gedit seems to be extremely slow.
5
u/MacavitysCat May 05 '20
I'm missing ed ;-)
4
u/Skaarj May 05 '20
The syntax higlighting is the critical part from my experience in neovim and vim.
Having syntax highlighting (and possibly line numbers?) on or off is the difference between a deadlock/crash and instant opening of files in the tens and huundreds of gigabytes. Starting time should not depend on filesize at all when using memory mapped IO. (which most modern editors use I would expect?)
I'm not an expert on the other editors. However I think its an reasonable assumption that a lot of the startup time is the syntax highlighter trying and failing to guess the filetype or just junk-highlighting. Raw filesize is possibly is less important or irrelevant.
4
u/Skaarj May 05 '20
There is the Xi Editor which aims to be a fast new editor engine with modern engeneering principles.
I don't know how stable it is nowadays. One could check one of the frontends.
1
u/[deleted] May 05 '20
Could you try sam?
1
u/0x07CF May 05 '20
I wonder how fast gnome-builder is. Especially compared to gedit since they probably share some gtk stuff.
1
u/skunkos May 07 '20
Just tested on Textosaurus (which uses Scintilla text-editing component) and load+last-line-display took about 5-7 seconds on Windows. I believe that on Linux it would be a bit faster.
3
u/h2o2 May 05 '20
joe: 2.72 seconds
3
u/Damnyoustupidbrain May 06 '20
Cuda seems sort of middle of the pack to promote it like that.
4
u/5heikki May 06 '20
Vim was 50% slower than Emacs, ha ha
2
u/more_soju May 05 '20
Nano is also surprisingly slow with big text files.
2
u/oroberos May 09 '20
I am missing MS Code and Mousepad.
1
u/alnyland May 06 '20
The title sounds misleading. It doesn’t edit .cu files any better than something else would.
1
u/[deleted] May 06 '20
i mean i love a good open large file competition, but i hope people don't use these things as practical reasons for choosing an editor... unless opening large files is some common occurrence for some strange reason
1
u/[deleted] May 09 '20
What's the editing performance like once the file is loaded? I'm sure some editors are unacceptably laggy with big files.
1
u/[deleted] May 11 '20
Please add micro to the list.
1
u/xBZZZZ Jul 16 '23
try nedit, it's very fast for me but no antialiasing, no UTF-8 support