Re: gtkmm Treeview is slow. Any tips?
- From: "Murray Cumming" <murrayc murrayc com>
- To: "eric jrdn" <eric_jrdn2 yahoo fr>
- Cc: gtkmm-list gnome org
- Subject: Re: gtkmm Treeview is slow. Any tips?
- Date: Mon, 12 Sep 2005 12:13:42 +0200 (CEST)
> Hello all,
> I would like to build a specific tabler/data display
> with Gtkmm.
> Data displaying is done with a drawing area and there
> is no problem with this. When I do not need to view
> the content of the data (ie just draw them) i use a
> stl vector<double> which is fast and easy to use,
> even if the number of data equals something like
> 100000 or 1 million. But I need to delete datas with a
> right click on a spreadsheet, which requires a
> Treeview and a ListStore : it is too slow for this
> task. Does it exist any replacement of them, more
> compatible with the stl vector class? Faster?
> The drawing area is linked with the data. The left and
> right arrows move a cursor on the screen following the
> datas. This is simple to do with a stl vector. How can
> I browse the data counter back in a ListStore?
> For now, I duplicate(!) the datas : the same datas are
> in a ListeStore and in a stl vector (this is
> inefficient, that's why I ask you for a solution...),
> and I use the one or the other if I have to do
> something or something else. Problem arises when i
> want to delete some datas and keep the two
> synchronised. Does anyone know how to solve this and
> avoid this stupid duplication of datas?
> Thank you in advance for your answers.
Avoiding duplication of large amounts of data usually requires a custom
treemodel. There's a simple example in gtkmm/examples, and some real-world
examples such as in Glom (and, I think, in gnome-db).
You might also try to make the ListStore the canonical store for your
data, though it would obviously not be as efficient as the std::vector.
murrayc murrayc com
] [Thread Prev