4 ms·
Emacs is much worse with long lines than it is with large files, and the test here uses 1,000 char lines. I'm not even sure I'd dare open a file that consisted
by to3m 10y ago
Emacs is much worse with long lines than it is with large files, and the test here uses 1,000 char lines. I'm not even sure I'd dare open a file that consisted of merely a single one of those.
However I've had no difficulty using it to view 3GByte files with 80-column lines. I don't have one handy to try but I did quickly load a 450MByte text file (6m lines, most 76 chars) and it took about 3 seconds to load.
- goalieca 10y ago1000 char lines are common for latex. I tend to let the text editor do wrapping on my paragraphs.
- dilap 10y agoyeah, emacs long line performance is in a really sad state. i find it can be quite handy to output really long lines in log files ("hey, here's all the game state at at tick N"), which i end up having to view either with command line tools or in sublime :-/. i dream of an editor with the flexibility of emacs that but the bug-freeness and speed of sublime. :)
- to3m 10y agoWhat I've typically done: output things as groups of lines, separated by blank lines, then use C-<up> (backward-paragraph) and C-<down> (forward-paragraph) to move between the blank lines. Also an option: C-x [ (backward-page) and C-x ] (forward-page) to move between occurrences of ^L (ASCII 12 - you can enter it in a buffer with C-q C-l).
- dilap 10y agoThat's a neat hack, though I'd still rather just use long lines -- it's easier, and it plays nicely with tools like grep. Come on emacs, other editors can handle them! :)
- jlarocco 10y agoI haven't had any problems loading multiple gigabyte log files, either. For really big files, there's even an Elisp "hack" to make it work better: https://www.emacswiki.org/emacs/vlf.el https://www.emacswiki.org/emacs/vlf.el I also have the following function in my .zshrc to disable "word wrap", specifically for when I need to read large log files that may have very long lines: emacsr () { emacs -nw "$1" --eval '(progn (setq buffer-read-only t) (setq truncate-lines t))' } I haven't noticed if it makes loading the files much faster (the lines aren't that long), but definitely makes it easier to read them in a terminal.