pan-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-devel] Re: Re: Want to fix memory consumption issues


From: K. Haley
Subject: Re: [Pan-devel] Re: Re: Want to fix memory consumption issues
Date: Wed, 16 Jun 2004 15:42:54 -0600
User-agent: Mozilla Thunderbird 0.6 (Windows/20040502)

Evan Martin wrote:

On Fri, Jun 04, 2004 at 06:51:36PM -0600, K. Haley wrote:
Cool.  So if that is the case, then it makes it easier to slap a DB
backend in place, as the GUI already seems to be reading in header
information into widgets in a piecemeal fashion.. which is what one wants.

The GUI should be requesting data from the Article as it's needed for display. If it's not then I would consider that to be a bug.

To do this:

- create your GtkTreeModel with only one "column", a pointer to the Article

- create your GtkTreeView with multiple columns that each has a custom
  "cell data" function:
This needs to be done for the grouplist as well. When I looked at the grouplist code I noticed that it copies every string into the GtkCList.

Another option would be implementing the GtkTreeModel interface on your
article list.  This, however, seems to be quite a lot of work.  I've
been working on a GtkTreeModel that works with an array (not list!) of
pointers that seems to be quite fast.  I typically update in large
batches, so I can reallocate the array once, and I delete rarely; for
other operations the array is much more efficient.


The other major optimization you can do is to use a GTK 2.4-specific
API that sets all of the rows to the same height; this cuts down on
computations significantly.  You lose support of differing-height (think
different languages) rows, but that may be acceptable (I don't know
enough about NNTP to know whether you can have non-ascii names/subjects,
etc).

I've almost finished writing a new Store for the grouplist which adds filtering support. I still have to write the sort code. If we move to 2.4 then we could use the FilteredTree, unfortunately 2.4 isn't on windows yet. The article list would have to be a tree structure to support threading. That is not something I would want to try and implement.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]