Jump to navigation Jump to search
no edit summary
[[Category:Feature Page Incomplete]][[Category:FeatureFeatureLanded|Optimize TreeViews]]
== Current status ==
* Targeted release: 0.102104* Last updated: Feb 24Nov 17, 2014* Percentage of completion: 6090%
== Detailed Description ==
* Sugar CellRendererIcon has too much logic inside. It should only handle how to render itself.
In particular, a CellRenderer is not a Widget, then do not have event to know when the mouse interact,
then needed attach to the events on the treeview []
* 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 * There are a additional block in the Journal. We That is not addressed by this feature, we guess there is a DBus blocking call, but we could't confirm that. === Implementation === * ScrollingDetector: A new class ScrollingDetector allow simplify slow operations while the treeview is scrolling.To use it, just do:  scrolling_detector = ScrollingDetector(self._scrolled_window) scrolling_detector.connect_treeview(self._tree_view) * CellRendererIcon changes: The CellRendererIcon is not a widget, then, do not receive events when the mouseenter or leaves, and all the logic in the CellRendererInvoker is more complex than should be.Worst, we had 6 different CellRendererIcons in the Journal, then we simplified (and solved issues) implementing aTreeViewInvoker. The TreeView knows where is every cell then the code is much more simple. The ObjectPalettes was created in the mouse enter callback, then if a user movedthe mouse cursor over the activity icons, many palettes were created, and that palette creation is expensive [].Moving the palette creation to the treeview, we can create the palette when the mouse was in a cell for a specified timeout and not before.
=== GTK+ concepts ===
* GtkCellRenderer — An object for rendering a single cell
== Benefit to Sugar ==
== 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 . We ran the test like this inside a Sugar shell:
To test the changes in the journal we used a python program to start the journal window from a terminal. You can download it here [] To use it do:  python -m cProfile > profile.txt After run it in a Sugar terminal, the view jump to the Home, but in the frame you can see two journal icons. The second is the profiled version. In the toolbar have a Stop button.After stop, you can check the profile.txt file.
== User Experience ==
== Comments and Discussion ==
Your comments are very welcome. Please discuss through the mailing list.
The initial announcement in the mailing list is here []


Navigation menu