TreeView: slow and very slow



Hi!  I'm implementing an inventory management program for our local food
coop using Python+Gtk2.  I use a ListStore+TreeView with CellRendererText
to display the items, and I'm finding it to be extremely slow.  Going
through 8000 records preparing for display takes <1 second.  Inserting
about 1500 rows in an unsorted ListStore takes about 2 seconds.  However,
it takes about 10 seconds after all insertion before the display is
updated.  My machine is even faster than the one at the store, so this will
not work.  How can I reduce the update time?

It gets even worse when the ListStore is sorted, then insertion takes 42
seconds!  But once the list has been displayed, sorting it takes only 2
seconds.  Thus, it'd be better to turn off sorting while inserting and turn
it back on afterwards, but where do I find what column sorts?

Thanks in advance,
-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| HÃ¥rdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's with the handbasket?



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