[Gtk-sharp-list] Speed of TreeView.AppendColumn()

Rodney J. Dyer rjdyer at vcu.edu
Thu Oct 26 22:10:27 EDT 2006

Quick question.  I've got a ui that shows a matrix (in a mathematical 
sense) to the user.  This ui is created de novo as the matrices may be 
large (maybe >1000 rows & columns).  When I the window is created, there 
is some overhead associated with adding say 1000 columns to a TreeView.  
In fact, it appears that it takes much longer to add N columns via

for(int i=0;i<N;i++)
    theView.AppendColumn("",new CellRendererText(),"text",i);

than it does to create N rows which have N elements being added via

for(int i=0;i<N;i++){
    TreeIter iter = theModel.Append();
    for(int j=0;j<N;j++)
       theModel.SetValue( iter, j, 
theDataSourceIAmGettingThisFrom[i,j].ToString() );

I'm disconnecting the View from the Model prior to doing all the 
appending/adding so that the ui isn't trying to be updated.   Anyone 
have any other hints on how to make it a bit speedier? 


More information about the Gtk-sharp-list mailing list