Sugar Developers,
In the field and amongst our own developers there have been numerous
complaints about the performance of Sugar. One simple thing we can do
to improve user experience is to stop taking screenshots on every
tabbing event, every activity focus change event, and every frame
appearance event.
The attached patch to Sugar (most recent git head, 48dd24c6e) does
simply that. Andrés Ambrois and I have tested the changes in question
on a machine running 656 and on a machine running 2263 (the most recent
joyride I have available-- code in question is identical to the current
sugar git head). We noted a considerable improvement in the speed and
consistency of activity switching performance.
These qualitative results are consistent with prior user interface
profiling tests by Riccardo Lucchese, which have established that
screenshot functionality occupies just shy of 50% of CPU time during
activity switching [1].
Please apply the patch and test on a *REAL* machine. Please comment on
the effects. Note that on recent joyride builds the appearance of the
frame on every tabbing event makes it more difficult to notice the
performance change.
Erik
[1] http://lists.laptop.org/pipermail/devel/2008-July/016722.html
The lines removed by the attached patch were part of the following
commits:
commit f300006b76ed905e52fb5b5848e09bf34a91216e
Author: Marco Pesenti Gritti <[EMAIL PROTECTED]>
Date: Tue Oct 23 15:19:17 2007 +0200
commit 0f565484a95c083d89c6f40b0d390d4109b5c46f
Author: Benjamin Berg <[EMAIL PROTECTED]>
Date: Fri Jun 20 16:49:38 2008 +0200
commit 14f1ca9b8491dee343305066facf8e7ae24e381f
Author: Tomeu Vizoso <[EMAIL PROTECTED]>
Date: Wed Apr 2 14:53:52 2008 +0200
diff --git a/src/view/Shell.py b/src/view/Shell.py
index a53ee93..b6ffbfe 100644
--- a/src/view/Shell.py
+++ b/src/view/Shell.py
@@ -190,8 +190,6 @@ class Shell(gobject.GObject):
if level == self._model.get_zoom_level():
return
- self.take_activity_screenshot()
-
if level == shellmodel.ShellModel.ZOOM_ACTIVITY:
host = self.get_current_activity()
if host is not None:
@@ -208,7 +206,6 @@ class Shell(gobject.GObject):
home_model = self._model.get_home()
previous_activity = home_model.get_previous_activity()
if previous_activity:
- self.take_activity_screenshot()
previous_activity.get_window().activate(
gtk.get_current_event_time())
@@ -216,7 +213,6 @@ class Shell(gobject.GObject):
home_model = self._model.get_home()
next_activity = home_model.get_next_activity()
if next_activity:
- self.take_activity_screenshot()
next_activity.get_window().activate(gtk.get_current_event_time())
def close_current_activity(self):
@@ -228,7 +224,6 @@ class Shell(gobject.GObject):
if active_activity.is_journal():
return
- self.take_activity_screenshot()
self.get_current_activity().close()
def get_current_activity(self):
diff --git a/src/view/frame/frame.py b/src/view/frame/frame.py
index 6009e7f..c3f0de9 100644
--- a/src/view/frame/frame.py
+++ b/src/view/frame/frame.py
@@ -146,8 +146,6 @@ class Frame(object):
if self._animator:
self._animator.stop()
- view.Shell.get_instance().take_activity_screenshot()
-
self.mode = mode
self._animator = animator.Animator(0.5)
diff --git a/src/view/tabbinghandler.py b/src/view/tabbinghandler.py
index 03ce275..e3153b0 100644
--- a/src/view/tabbinghandler.py
+++ b/src/view/tabbinghandler.py
@@ -58,7 +58,6 @@ class TabbingHandler(object):
self._tabbing = False
else:
shell = view.Shell.get_instance()
- shell.take_activity_screenshot()
self._frame.show(self._frame.MODE_NON_INTERACTIVE)
_______________________________________________
Sugar mailing list
[email protected]
http://lists.laptop.org/listinfo/sugar