[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Emacs has hard time with big text files

Martin wrote:
On Mon, Sep 08, 2008 at 09:28:42AM +0200, Johann Spies wrote:
After reading your message I did a quick test: I have opened a 279Mb
(2632033 lines) file in emacs and in vim. That is on a laptop with 4G
ram (64-bit system).

My comp is PII with 192Mb RAM and 255Mb swap.
As my 46 MB file keeps growing up I hit the limit.
When opening file of 150Mb size emacs show in minibuffer:
Maximum buffer size exceeded
and refuse to open the file at all!
I added another 1Gb of swap but it did not help.
How does emacs decide the maximum size of file it accept?


There are always limits. Sometimes arbitrary, sometimes hard-line, e.g. 32 bits cannot hold an address larger than 4G minus one bytes. I'm sure many would tell you to either use an editor that allows editing from the disk, rather than all in memory, or get a computer that has more resources (or upgrade yours). I recommend both, actually.

I think emacs has defined its own data types in elisp, and that dictates the limits. The size of a buffer is held in a variable. The type of the variable limits the size of the buffer.

Mark Allums

Reply to: