Re: GtkTreeView: inserting rows faster. [follow up]



On Sun, 2003-04-13 at 10:37, Jonathan Blandford wrote:
> Peter Zelezny <pzel dodo com au> writes:
> 
> 
> > > Odd.  Unless you're marking the whole tree dirty, or swapping out models
> > > or something, I can't see why that would happen.
> > 
> > It was happening due to:
> > 
> > gtk_tree_view_column_set_sizing (gtk_tree_view_get_column (treeview, 0),						GTK_TREE_VIEW_COLUMN_AUTOSIZE);
> > 
> > I guess that caused a wholesale rehash of the entire list, everytime I inserted
> > just one row. Without it, performance is very good.
> 
> Ah, yes.  That will do it.  Autosize can force a rescan if the new row
> is of less than the current width.  There's really nothing I can do
> (short of caching the width of every cell) to fix that.
> 
> Thanks,
> -Jonathan

Maybe I'm missing something, but if a new cell is inserted into an
autosized column and its width is less than that of the current width,
shouldn't the current width be used? Unless you removed or changed a
cell, the longest cell's width wouldn't be altered by inserting a
shorter one. 

-- 
--Shahms



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