help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Accelerating Emacs?


From: Stefan Monnier
Subject: Re: Accelerating Emacs?
Date: Mon, 31 Oct 2005 23:55:20 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> The CPU of this machine is Pentium(R) 4 CPU 2.80 GHz, and there is
> 504 MB physical memory, running Windows XP and Emacs 21.3.

That sounds quite reasonable.

> I tried this, Task Manager said Emacs were using 229 636K memory
> by the time I wrote this sentence.

My guess is that most of that memory is in the undo-log.  The undo-log works
well in general, but there are indeed "corner cases" where it ends up using
a lot of memory.

> I found Emacs used more and more memory when generating random data, so
> did when it replacing.  These memory is released after Emacs finishes its
> job.  Is this because Emacs operating buffer residing in memory?

No.  E.g. the undo-log cannot be shrunk before some undo-boundary is
inserted, which only happens later.  You could report your problem via
M-x report-emacs-bug.

> This happens when I am testing a 100MB size file. I go to the beginning
> of the file, press C-SPACE, then go to the end of the file, press M-w.

M-w copies the marked region, so you end up with a 100MB buffer plus
a 100MB string.  100MB thingies is definitely pushing it in Emacs nowadays.
On 64bit machines it may work better, but it's still likely that using Emacs
to edit 100MB files won't work well unless you're careful to use a special
"stripped-down" mode.

> So perhaps I can restate it like this: if Emacs starts to be slow in
> some condition, it is better of using some other tools instead of
> it. And I find it very cool of running vim in Eshell.

Sounds right.  I think it's good practice to complain about those situations
(via M-x report-emacs-bug) so that Emacs maintainers keep it in mind, but
it's clear that Emacs is not designed to edit very large files.  I tend to
use `sed' for that in most cases.


        Stefan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]