Gtk2::TreeView performance
- From: "Philipp E. Letschert" <phil uni-koblenz de>
- To: gtk-perl-list gnome org
- Subject: Gtk2::TreeView performance
- Date: Mon, 4 Dec 2006 16:12:55 +0100
Hi,
I've run into some performance troubles with Gtk2::TreeView.
What I do is: Read a file with a couple of ten-thousand of lines (or more),
about 50 fields per line and build a hash from it. This is the data I put into a
Gtk2::Liststore for the TreeView. Each row can be displayed colored, depending
on a certain column value. The user can select which of the 50 columns he would
like to see, after changes of this selection the whole TreeView is rebuild.
To make things more complicated each column should be sortable and reorderable,
and the user should be able to perform actions on selected rows. All these
things work, but it is amazingly slow, once the number of rows exceeds 10000.
I've done lots of experimenting and some research and found these hints:
- set fixed with and fixed height
did this, but no real performance gain
- disable sorting while building the treeview
did this via $colum->set_sortable(FALSE), but no real performance gain
- write a custom cellrenderer
don't really know how to do this with performance in mind, just found the
cellrenderer_* examples in the docs
- only load the rows into the treeview that actually fit into the window
no clue how to do this
It would be great if someone with a real clue could shed some light, if such a
high-performance TreeView is possible with perl-gtk, and how an approach could
look like.
I'm afraid a possible answer could be: "No! use C++ instead".
Since a solution to this problem is interesting to me I would also like to help
in developing some demo code for the examples section.
Thanks, Philipp
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]