2,596 bytes added
, 18:49, 24 February 2014
<noinclude>
[[Category:Feature Page Incomplete]]
[[Category:Feature|.]]
</noinclude>
== Summary ==
Gonzalo Odiard and Manuel Quiñones did a hackaton to find out why the
lists that contain icons are so slow. The affected views in Sugar are
the Journal list and the activities list. This feature is about improving the TreeView performance.
== Owner ==
* Name: [[User:Manuq| Manuel Quiñones]]
* Name: [[User:Godiard| Gonzalo Odiard]]
== Current status ==
* Targeted release: 0.102
* Last updated: Feb 24, 2014
* Percentage of completion: 60%
== Detailed Description ==
=== Findings ===
* The source of the performance issues is Sugar CellRendererIcon, a treeview without it works ok. https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/graphics/icon.py#L781
* Sugar CellRendererIcon has too much logic inside. It should only handle how to render itself.
* Sugar CellRendererIcon is connected to many signals. Just detaching them while scrolling provides a performance boost.
* Sugar CellRendererIcon could benefit from caching values instead of calculating them on each render.
We couldn't find what's wrong with the Journal. We guess there is a DBus blocking call, but we could't confirm that.
=== GTK+ concepts ===
* GtkTreeView — A widget for displaying both trees and lists https://developer.gnome.org/gtk3/stable/GtkTreeView
* GtkTreeViewColumn — A visible column in a GtkTreeView widget https://developer.gnome.org/gtk3/stable/GtkTreeViewColumn.html
* GtkCellRenderer — An object for rendering a single cell https://developer.gnome.org/gtk3/stable/GtkCellRenderer
== Benefit to Sugar ==
Performance!
== Scope ==
Affects Shell and Toolkit.
==UI Design==
We should not regress treeviews. Pay special attention to Journal list and activities list.
== How To Test ==
We did a test program that has a list (treeview) with many rows. Each row has a cellrenderer icon. The program automatically starts scrolling until the end of the list is reached. Then we can get profiling information using Python cProfile http://docs.python.org/2/library/profile.html . We ran the test like this inside a Sugar shell:
python -m cProfile test_treeview.py > profile.txt
== User Experience ==
Users should notice a performance boost.
== Dependencies ==
No deps.
== Contingency Plan ==
These optimizations can come in small steps, so there is no need for a contingency plan.
== Documentation ==
To be written.
== Release Notes ==
To be written.
== Comments and Discussion ==
Your comments are very welcome. Please discuss through the mailing list.