Hi,

I've been (slowly) trying to create something that should support just the sort of thing you are trying to do.

I've found using
GtkTreeModelFilter and GtkTreeModelSort with large data sets runs into serious performance issues.   With very large datasets I also ran into trouble with plain GtkTreeModel -- the C code allocates an gtkrbtree big enough to hold all the records in your model as soon as you let on how big your model is :(

To that endy I've been working on a thing I call easygrid -- my main focus has been to get a good grid widget to display tables from hd5f files (google on pytables for more info about hd5f).  
You can get a copy here:

http://www.earthenware-services.org/software/EarthenwareLibrary/

The bad news is this thing still needs a bit of work, but it is getting there.   The solution to the performance issues is to have a normal treeview with a small model (a few thousand rows) and then buffer data into the model as needed.   In addition, I have to hide the vertical scrollbar and add my own.   The really tricky bit is hooking into all the right events and getting the thing to work smoothly.

I'd be delighted to have someone else help polishing this off.

I've a feeling that the version on Earthenware is a bit out of date, so I'll compare with my latest code and maybe put out a new version later today.

John

Richard Taylor wrote:
[pygtk] Pure python GtkTreeModelFilter

Hi

I am about to start on a pure python implementation of GtkTreeModelFilter and
before I start I thought it would be a good idea to check if someone else has
already done it.

Why would I do such a thing? Well, we have to subclass gtk.GenericTreeModel
for the list models in our app because the contents of the lists are being
pulled from a database and can potentially contain 100,000's of records. The
trouble is that the C version of GtkTreeModelFilter does not work with Python
subclasses of gtk.GenericTreeModel. Hence I thought it would be a good idea
write a Python implementation to do the job or at least to simulate enough of
the job to allow sharing of a gtk.GenericTreeModel instance accross multiple
views with filtering support.

So has anyone already done this? The same question goes for GtkTreeModelSort.

Richard

--
You can normally find me on Jabber as [EMAIL PROTECTED]
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to