* gnus calling garbage collection?
@ 2011-06-24 10:33 lee
2011-06-26 9:20 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: lee @ 2011-06-24 10:33 UTC (permalink / raw)
To: ding
Hi,
is gnus calling the garbage collection function of emacs for every
message it writes when checking for new news? Trying to make it faster,
I have set
(setq gc-cons-threshold (* 4 1024 1024))
(setq garbage-collection-messages t)
in ~/.emacs, and that causes the display about messages written in the
echo area to flicker. The other message flickers too fast to read it and
doesn't show up in the *Messages* buffer, so I disabled the garbage
collection messages to verify, and the flickering stopped.
If gnus does call the garbage collection for every message it writes, is
there a way to disable this? It's already slow enough, and I guess it
would be a little faster without collecting garbage for every message
written.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnus calling garbage collection?
2011-06-24 10:33 gnus calling garbage collection? lee
@ 2011-06-26 9:20 ` Lars Magne Ingebrigtsen
2011-06-26 20:13 ` lee
0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-06-26 9:20 UTC (permalink / raw)
To: ding
lee <lee@yun.yagibdah.de> writes:
> is gnus calling the garbage collection function of emacs for every
> message it writes when checking for new news?
Emacs collects garbage automatically whenever it feels like it. Gnus
doesn't call the gc functions explicitly.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnus calling garbage collection?
2011-06-26 9:20 ` Lars Magne Ingebrigtsen
@ 2011-06-26 20:13 ` lee
2011-06-26 20:48 ` Andreas Schwab
0 siblings, 1 reply; 5+ messages in thread
From: lee @ 2011-06-26 20:13 UTC (permalink / raw)
To: ding
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> lee <lee@yun.yagibdah.de> writes:
>
>> is gnus calling the garbage collection function of emacs for every
>> message it writes when checking for new news?
>
> Emacs collects garbage automatically whenever it feels like it. Gnus
> doesn't call the gc functions explicitly.
Then the question is why emacs calls the garbage collection functions
for each message gnus is fetching out of the inbox despite
gc-cons-threshold is set to 4GB.
In trying to find a way to make fetching messages faster, I've been
reading some documentation: [1], [2] and [3]. About gc-cons-threshold,
they are saying in [3]:
,----
| The value of this variable is the number of bytes of storage that must
| be allocated for Lisp objects after one garbage collection in order to
| trigger another garbage collection.
`----
It seems somewhat unlikely that fetching one message from the inbox and
storing it somewhere in the nnml storage involves allocating (more than)
4GB of memory.
Is that a bug in emacs (GNU Emacs 23.3.1), or is 4GB too much? Hm, I'll
it with 1GB and see what happens ...
Yeah, it's doing a crazy amount of garbage collection. With
gc-cons-threshold set to 1GB, it seems to be doing considerably more
garbage collection than it does when I set it to 8GB.
Is there any good documentation about this? It seems that
gc-cons-percentage may also be important ...
[1]: http://www.emacswiki.org/emacs/GnusSpeed
[2]: http://www.gnu.org/software/emacs/manual/html_node/gnus/_005b9_002e2_005d.html
[3]: http://www.gnu.org/software/emacs/elisp/html_node/Garbage-Collection.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnus calling garbage collection?
2011-06-26 20:13 ` lee
@ 2011-06-26 20:48 ` Andreas Schwab
2011-06-26 23:37 ` lee
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2011-06-26 20:48 UTC (permalink / raw)
To: ding
lee <lee@yun.yagibdah.de> writes:
> gc-cons-threshold is set to 4GB.
(* 4 1024 1024) is not 4GB.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnus calling garbage collection?
2011-06-26 20:48 ` Andreas Schwab
@ 2011-06-26 23:37 ` lee
0 siblings, 0 replies; 5+ messages in thread
From: lee @ 2011-06-26 23:37 UTC (permalink / raw)
To: ding
Andreas Schwab <schwab@linux-m68k.org> writes:
> lee <lee@yun.yagibdah.de> writes:
>
>> gc-cons-threshold is set to 4GB.
>
> (* 4 1024 1024) is not 4GB.
Argh, of course it's 4MB, that's quite a difference! That happens when I
stay up too long :(
Now I'm trying
(setq gc-cons-threshold (* 512 1024 1024))
(setq gc-cons-percentage 0.9)
... after finding out that it's easy to make emacs allocate about 14GB
of memory. This will take some more experimentation.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-26 23:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-24 10:33 gnus calling garbage collection? lee
2011-06-26 9:20 ` Lars Magne Ingebrigtsen
2011-06-26 20:13 ` lee
2011-06-26 20:48 ` Andreas Schwab
2011-06-26 23:37 ` lee
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 NNTP newsgroup(s).