Re: Problem with a TreeView - speed



On Mon, 2009-03-16 at 13:33 +0100, Dimitri Holz wrote:
> But I do already update TreeView via a timout callback that runs every
> second (one second) !

Ah. I misunderstood. So the problem is that you want to add 8000 rows in
one second.

There are some things that might help, with varying levels of
difficulty:
a) Make sure that the model is not in the view while you are modifying
it.
b) Do not copy all the data into the model. Memory copying is slow.
Store some reference/pointer to the data and use a cell_data_func to
show the _visible_ parts of the row. You still have to add every row to
the model, but only the 10 or so visible rows will need to get the data
for the extra columns.
c) Implement a custom TreeModel to try to do even less data copying.
This is difficult.

Other people might have some other ideas.

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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