Gnus development mailing list
 help / color / mirror / Atom feed
From: Daniel Pittman <daniel@rimspace.net>
To: ding@gnus.org
Subject: Re: Huge memory consumption on accessing large newsgroup
Date: Tue, 02 Oct 2007 22:17:46 +1000	[thread overview]
Message-ID: <871wcdww0l.fsf@enki.rimspace.net> (raw)
In-Reply-To: <m2ve9p6aab.fsf@lifelogs.com> (Ted Zlatanov's message of "Tue, 02 Oct 2007 06:11:40 -0500")

Ted Zlatanov <tzz@lifelogs.com> writes:
> On Tue, 02 Oct 2007 13:23:56 +1000 Daniel Pittman <daniel@rimspace.net> wrote: 
>
> DP> The issue with large memory consumption, as far as I could see
> DP> from the thread, was that the compressed range data type was
> DP> expanded to a flat list.  This caused, no surprise, huge memory
> DP> use.
>
> DP> The original problem is that the code calls
> DP> `gnus-uncompress-range' on the data *at all* -- and, so, turns a
> DP> nicely brief data structure into a vast bloated million-number
> DP> list.
>
> DP> The *solution* is to rebuild the algorithm to operate on the
> DP> compressed version (regardless of the internal representation),
> DP> not to change the representation.
>
> You're right, I didn't know this.  I thought the memory problems were
> caused by the original list.  

*nod*  I figured as much. :)

[...]

> DP> (And because this has been a stupidly annoying couple of week in other
> DP>  areas, and because this is nice simple and essentially stress-free work
> DP>  I am getting tempted to fix it myself.
>
> DP>  So, maybe inversion lists were the way to get the code fixed after all,
> DP>  if not quite so directly as expected. ;) 
>
> The `gnus-uncompress-range' function is not called in too many places:

[...]

> In gnus-number-of-unseen-articles-in-group for example it's called
> only to find the length of the list, and in gnus-move-group-to-server
> only to see if the list is not nil.  

Mmm.  The not nil version should really be killed, as a guide, and the
length isn't too awful.  The length version can just call
`gnus-range-length' and be done with it...

> There's room for improvement.  Maybe there should be a group API that
> abstracts the data structures, so subordinate code doesn't have to
> know if it's a list or a compressed range?  That would be a good first
> step to cleaning things up.

Maybe.  I think in most cases it is just that the range code wasn't
pushed everywhere it could be because, in most cases, you never /really/
see the pain.

Regards,
        Daniel
-- 
Daniel Pittman <daniel@cybersource.com.au>           Phone: 03 9621 2377
Level 4, 10 Queen St, Melbourne             Web: http://www.cyber.com.au
Cybersource: Australia's Leading Linux and Open Source Solutions Company



  reply	other threads:[~2007-10-02 12:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87wsw4u21m.fsf@gmx.de>
2007-08-10  9:08 ` Katsumi Yamaoka
2007-08-10 11:39   ` Katsumi Yamaoka
2007-08-10 12:43     ` Sven Joachim
2007-08-13 11:44       ` Katsumi Yamaoka
2007-08-13 17:30         ` Sven Joachim
2007-08-14 11:46           ` Katsumi Yamaoka
2007-09-13 10:27             ` Katsumi Yamaoka
2007-08-10 12:42   ` Sven Joachim
2007-09-29 21:04     ` Gaute Strokkenes
2007-09-30 22:11       ` Ted Zlatanov
2007-10-01  0:29         ` Katsumi Yamaoka
2007-10-01  1:04         ` Daniel Pittman
2007-10-02  2:13           ` Ted Zlatanov
2007-10-02  3:23             ` Daniel Pittman
2007-10-02 11:11               ` Ted Zlatanov
2007-10-02 12:17                 ` Daniel Pittman [this message]
2007-10-02 16:08                   ` Ted Zlatanov
2007-10-03  0:19                     ` Daniel Pittman
2007-10-02 13:33               ` Daniel Pittman

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=871wcdww0l.fsf@enki.rimspace.net \
    --to=daniel@rimspace.net \
    --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).