Hello everyone,
I’ve been using Emacs for a while now and love its flexibility, but I’ve been running into some performance issues when working with large files (100MB+). Whenever I open such files, Emacs slows down significantly, and simple operations like scrolling, searching, or editing become sluggish.
I’ve already tried a few optimizations, such as:
- Enabling
so-long-mode
to improve handling of long lines - Disabling syntax highlighting with
(global-font-lock-mode -1)
- Increasing
gc-cons-threshold
to delay garbage collection - Running Emacs in terminal mode instead of GUI
These tweaks help a bit, but I still experience lag, especially when navigating through very large text files or logs. I’m wondering if there are any other best practices, packages, or configuration changes that can make Emacs more efficient in handling large files.
Some specific questions I have:
- Are there lightweight alternative modes or configurations specifically designed for large file editing?
- Would using
vlf
(Very Large File mode) orview-mode
be a better approach? - Are there any lesser-known optimizations related to I/O buffering, lazy loading, or background processing that could help?
I’d appreciate any insights from experienced users who have tackled similar performance challenges. Looking forward to your recommendations!
I also checked this: https://emacs-china.org/t/window-configuration-killed-buffer/tableau
Thanks in advance!