From: Eli Zaretskii <eliz@gnu.org>
Subject: Re: Accelerating Emacs?
Date: Fri, 28 Oct 2005 15:13:33 +0200 [thread overview]
Message-ID: <u64rheqde.fsf@gnu.org> (raw)
In-Reply-To: <BAY112-F3384C9371F0710F12AE270DA6B0@phx.gbl> (herberteuler@hotmail.com)
> From: "Herbert Euler" <herberteuler@hotmail.com>
> Date: Fri, 28 Oct 2005 19:31:35 +0800
>
> >What kind of machine do you have there? I tried this on a 3MB file
> >(my email inbox), and it took less than 1 minute, even though I needed
> >to answer the question about discarding undo info several times during
> >that time. This is on a 3GHz Pentium 4 running Windows XP. I then
> >tried the same with a 19MB email box on a 700MHz Pentium III running
> >Debian GNU/Linux, and it took 13 minutes there (vim did it in 30
> >seconds). Perhaps you should upgrade your hardware?
>
> 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.
And on this machine, it took Emacs more than 20 minutes to do the
replacement in a 8.8 MB file? That's amazingly slow, and contradicts
my testing (although I tested on a real file, not one with random
text)!
> Task Manager said Emacs were using 229 636K memory
Probably because the program that you used to generate the random file
conses a lot of strings. Forcing garbage collection could have
returned some of the memory to the OS.
> 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.
It is also released during garbage collection.
> 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.
> Emacs told me:
>
> Warning: past 95% of memory limit
Well, M-w causes Emacs to copy the entire 100MB region into the
Windows clipboard. To do that, Emacs allocates a temporary buffer
copies those 100MB into the buffer, then encodes the text in the
temporary buffer as appropriate for the Windows clipboard. As your
system has only 512MB of installed physical memory, using up 100MB
could easily exhaust what your machine has.
If you really need to copy/paste such large regions, you should
disable the automatic copying into the clipboard.
> 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.
That is always true. As Per wrote elsewhere in this thread, Sed is
ideally suited for the substitutions that you tried, especially on
very large files.
next prev parent reply other threads:[~2005-10-28 13:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.12998.1130466347.20277.help-gnu-emacs@gnu.org>
2005-10-28 2:59 ` Accelerating Emacs? Flying Grass
2005-10-28 5:53 ` Herbert Euler
2005-10-28 8:23 ` Eli Zaretskii
2005-10-28 11:31 ` Herbert Euler
2005-10-28 13:13 ` Eli Zaretskii [this message]
[not found] ` <mailman.13044.1130487836.20277.help-gnu-emacs@gnu.org>
2005-10-28 10:36 ` Per Abrahamsen
[not found] <mailman.13061.1130499101.20277.help-gnu-emacs@gnu.org>
2005-10-28 12:08 ` David Kastrup
2005-10-28 13:43 ` Herbert Euler
2005-10-28 12:49 ` Thien-Thi Nguyen
2005-11-01 4:55 ` Stefan Monnier
[not found] <mailman.13033.1130478796.20277.help-gnu-emacs@gnu.org>
2005-10-28 8:59 ` Alan Mackenzie
2005-10-28 18:28 ` Herbert Euler
2005-10-29 10:18 ` Eli Zaretskii
2005-10-29 11:44 ` Herbert Euler
2005-10-29 15:43 ` Eli Zaretskii
2005-10-31 3:26 ` Herbert Euler
2005-10-28 2:25 Herbert Euler
2005-10-28 8:25 ` Eli Zaretskii
2005-10-28 11:38 ` Herbert Euler
2005-10-28 13:16 ` Eli Zaretskii
[not found] ` <mailman.13045.1130488013.20277.help-gnu-emacs@gnu.org>
2005-11-28 1:09 ` Christopher C. Stacy
2005-11-28 5:21 ` Eli Zaretskii
[not found] ` <mailman.17015.1133155279.20277.help-gnu-emacs@gnu.org>
2005-11-28 5:46 ` Pascal Bourguignon
2005-11-28 10:26 ` Thien-Thi Nguyen
2005-12-01 4:43 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u64rheqde.fsf@gnu.org \
--to=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).