From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Accelerating Emacs? Date: Mon, 31 Oct 2005 23:55:20 -0500 Organization: Bell Sympatico Message-ID: <87br152d73.fsf-monnier+gnu.emacs.help@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1130821286 24812 80.91.229.2 (1 Nov 2005 05:01:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 1 Nov 2005 05:01:26 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 01 06:01:25 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EWoFz-0006Va-AU for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Nov 2005 06:00:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EWoFy-0005Yg-Pq for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Nov 2005 00:00:22 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:FVA5/bS2i+yKw3JNx85J3uT94gI= Original-Lines: 40 Original-NNTP-Posting-Host: 70.48.82.56 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1130820927 70.48.82.56 (Mon, 31 Oct 2005 23:55:27 EST) Original-NNTP-Posting-Date: Mon, 31 Oct 2005 23:55:27 EST Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!news.glorb.com!news.louisville.edu!tor-nx1!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:135141 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30732 Archived-At: > 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