[ prog / sol / mona ]

prog


Emacs ate all of my RAM

1 2022-07-23 10:49

I know that performance of Emacs is notoriously poor when it encounters long lines. I have a somewhat large file (260KB), that might have about 100 or 200 longer lines (in the ballpark of 1000 characters). I recognize that this might be difficult for Emacs to handle due to its underlying algorithm choice - but is that enough to forgive it for eating 9 GIGABYTES of my RANDOM ACCESS MEMORY, 4 GIGABYTES of my SWAP FILE, and then TRIGGERING THE OOM KILLER, just because I selected the entire buffer? I don't think so.

The interesting thing is that it only happens in the GUI. Without the configuration file loaded, it doesn't consume all of the memory - it settles on consuming CPU cycles instead. emacs -nw works fine even with the configuration file loaded - which is helluva weird, because the only difference between the graphical and terminal modes would be the slightly different settings for the faces and such - all of the packages loaded and configuration are otherwise the same. What gives? Is the GUI version of Emacs so poorly optimized?

16


VIP:

do not edit these