20 Februari 2013

simple solution of slow treeview in pygtk

I found out that the solution was pretty simple. Instead of putting every value into _attached_ treeview's model, it is much faster to detach the model first, fill it with data, then reattach the model into treeview again. The improvement was very significant.
here is the sample code.
treeVw.set_model(None)
batch_insertdata(dataList)
treeVw.set_model(dataList) 

Tidak ada komentar: