Gnus development mailing list
 help / color / mirror / Atom feed
From: lee <lee@yun.yagibdah.de>
To: ding@gnus.org
Subject: Re: gnus calling garbage collection?
Date: Sun, 26 Jun 2011 22:13:46 +0200	[thread overview]
Message-ID: <8762nsz6yt.fsf@yun.yagibdah.de> (raw)
In-Reply-To: <m37h890x13.fsf@quimbies.gnus.org>

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



  reply	other threads:[~2011-06-26 20:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-24 10:33 lee
2011-06-26  9:20 ` Lars Magne Ingebrigtsen
2011-06-26 20:13   ` lee [this message]
2011-06-26 20:48     ` Andreas Schwab
2011-06-26 23:37       ` lee

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8762nsz6yt.fsf@yun.yagibdah.de \
    --to=lee@yun.yagibdah.de \
    --cc=ding@gnus.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 NNTP newsgroup(s).