4 ms·
So that's why emacs whigs out sometimes when trying to open very large files: because it has a recursive GC that has trouble when it runs out of stack space. As
by pulisse 9y ago
So that's why emacs whigs out sometimes when trying to open very large files: because it has a recursive GC that has trouble when it runs out of stack space. Assuming I read the first statement correctly.
That doesn't seem right to me. (a) In emacs a file's contents aren't stored in a deeply nested structure, no matter what the size. It's a gap buffer. (b) Structure aside, that buffer isn't a Lisp object, but an object internal to the C level, so not subject to GC. And note that Emacs's large file behavior isn't especially different than other non-minimalist editors[1].
https://github.com/jhallen/joes-sandbox/tree/master/editor-perf#time-to-load-3-gb-file-insert-character-at-start-and-exit https://github.com/jhallen/joes-sandbox/tree/master/editor-p...