Re: [pygtk] push huge array into liststore

2010-07-14 Thread Cornelius Kölbel
Hi List, hi Zyphos, cl. Detaching the model from the treeview already speeded up things from 50 seconds to unbelievable 20 seconds! I will also take a look at the other hint. Thanks a lot and kind regards Cornelius Am 13.07.2010 15:35, schrieb Zyphos: Hi, a solution is written into the

Re: [pygtk] push huge array into liststore

2010-07-14 Thread Cornelius Kölbel
Hello List, hello Gerald, this reduced the time from roughly 20 sec to 19.5 sec. So real evil thing i was doing was sorting and filtering on the model. So detaching the model from the treeview while filling it, is far the best idea ,-) Thanks a lot and kind regards Cornelius Am 13.07.2010

Re: [pygtk] push huge array into liststore

2010-07-14 Thread Timo
On 14-07-10 11:19, Cornelius Kölbel wrote: Hello List, hello Gerald, this reduced the time from roughly 20 sec to 19.5 sec. So real evil thing i was doing was sorting and filtering on the model. So detaching the model from the treeview while filling it, is far the best idea ,-) I

Re: [pygtk] push huge array into liststore

2010-07-13 Thread Zyphos
Hi, a solution is written into the FAQ: http://faq.pygtk.org/index.py?req=showfile=faq13.043.htp treeview.freeze_child_notify() treeview.set_model(None) # Add rows to the model # ... treeview.set_model(model) treeview.thaw_child_notify() Regards, Zyphos Tim Evans a écrit : On

Re: [pygtk] push huge array into liststore

2010-07-13 Thread Gerald Britton
On Mon, Jul 12, 2010 at 9:09 PM, Tim Evans t.ev...@aranz.com wrote: On 2010-07-13 3:48, Cornelius Kölbel wrote: Dear list, I got an array of dictionaries, that I want to add to a GTKListStore, that is displayed an a treeview. This is very slow. I already replaced the liststore.append by

Re: [pygtk] push huge array into liststore

2010-07-13 Thread Gerald Britton
2010/7/12 Gerald Britton gerald.brit...@gmail.com: First off, why are you using an array?  Not that it's bad or anything, but how does it help you where a simple list would not? Second, what would be nice is if liststore.insert would take an interable.  Baring that you could simplify a little

Re: [pygtk] push huge array into liststore

2010-07-12 Thread Pietro Battiston
Il giorno lun, 12/07/2010 alle 17.48 +0200, Cornelius Kölbel ha scritto: Dear list, I got an array of dictionaries, that I want to add to a GTKListStore, that is displayed an a treeview. This is very slow. I already replaced the liststore.append by liststore.insert, which is much much

Re: [pygtk] push huge array into liststore

2010-07-12 Thread Gerald Britton
First off, why are you using an array? Not that it's bad or anything, but how does it help you where a simple list would not? Second, what would be nice is if liststore.insert would take an interable. Baring that you could simplify a little like this: keys = ['v1', 'v1', ..., 'vn'] for d in

Re: [pygtk] push huge array into liststore

2010-07-12 Thread Tim Evans
On 2010-07-13 3:48, Cornelius Kölbel wrote: Dear list, I got an array of dictionaries, that I want to add to a GTKListStore, that is displayed an a treeview. This is very slow. I already replaced the liststore.append by liststore.insert, which is much much faster. But still, filling the