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



On 28 Mar 2003 18:04:11 -0500
Jonathan Blandford <jrb redhat com> wrote:

> > > Insert before is not without adding a back pointer.  Also, we need to
> > > know the location of rows when we emit the signal.  This does require
> > > the walking of the list, but I feel this is prolly fast -- especially as
> > > we special case the last row (which is reasonably common.)  We might be
> > > able to do a few more special cases, but I'd really like to make sure
> > > this is slow first.
> > 
> > Something in the idle timeout (incremental reflow?) is causing undue
> > redraws or cpu usage. If I insert 500 rows in a loop, it doesn't cause
> > any more of a cpu hit than inserting 1 row. It's got something to do
> > with the icons in Column-0, because I can't reproduce it with a flat
> > 1 column list.
> 
> 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.


-- 
Peter Zelezny.



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