Slow treemodel loading



The first time I load the liststore (during program start), it loads
quickly.  Then I set sort column ID so that I can sort by column.  When I
clear the liststore and load the next data set, the treeview updates slowly
even when it's actually the same dataset.  If I substitute a simple sort
function during loading, performance improves a bit.  If I never set the
sort column ID, performance improves even more.  I conclude that it's the
sort function that is retarding the update.  If there were a way to turn
off the sort, I would not have a problem.  As it says in the documentation
for TreeSortable:

Once a sort column ID has been set on a gtk.TreeModel...you cannot set the
gtk.TreeModel to have no sort function.

The inability to clear the sort function seems very unfortunate to me right
now.

I considered starting over with a new liststore, but doing so is
inconvenient.  Now I am considering loading the liststore with only some of
the data initially and the rest on idle.  But first I am hoping that
someone will tell me that there actually is a way to turn off sort.
-- 
Jeffrey Barish




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