[Sugar-devel] Research: 0.84 Launcher Cost

James Cameron quozl at laptop.org
Wed Oct 27 23:34:09 EDT 2010


Earlier in the context of SL#2080 patch review, I had said "the
launcher is stealing CPU cycles from the startup of the activity, the
task run queue shows this during a launch.  I wonder if activities
might start up faster if there was no launcher, just a busy cursor."

Looks like activities would start faster; between one and four seconds,
mostly depending on the activity, and slightly depending on the icon
complexity.

Details below.

--

Research: will activities start faster if there is no launcher?

Method: using an XO-1, freshly installed with Sugar 0.84.22, as part
of OLPC OS 10.1.2 build os852, test the startup time of three
activities (Memorize, Moon and Chat), remove the launcher, retest,
subtract.

The launcher is implemented by source file launcher.py in
/usr/lib/python2.6/site-packages/jarabe/view/ ... the modification
made is attached as a patch.

The times were captured with a stopwatch.  The timing began when "Start"
was selected from the list view, and ended once the activity had
completed display of the UI.

Result:

a.  unmodified launcher.py

Memorize-34 9.43s, 9.56s, 9.51s
Moon-11 11.58s, 11.60s, 11.65s
Chat-65 6.65s, 6.54s, 6.59s

b.  modified launcher.py (black background, no animation),

Memorize-34 7.60s, 7.63s, 7.60s
Moon-11 7.78s, 7.78s, 7.95s
Chat-65 5.04s, 4.93s, 4.88s

c.  calculated cost of launcher

Memorize-34 1.89s
Moon-11 3.73s
Chat-65 1.64s

Diagnosis: removing the launcher animation saved between one and four
seconds of startup time.  The saving was greatest for the Moon activity.

--

Research: determine if the SVG icon for the Moon activity contributes
to the delay.

Method: swap the icons, restart Sugar, retest only Chat activity with
Moon icon.

Result:

a.  unmodified launcher.py

Chat-65 7.83s, 7.59s, 7.62s

b.  modified launcher.py (black background, no animation),

Chat-65 4.99s, 4.87s, 4.90s

c.  calculated cost of launcher

Chat-65 2.75s (greater than previous)

d.  calculated cost of moon icon over chat icon

Chat-65 1.09s

Diagnosis: the degree of saving has a little to do with the SVG icon
complexity.  The degree of saving has much to do with the mix of
operations performed by the activity during startup.

--

So, between 23 and 92 wasted days of looking at the launcher across
two million laptops.  Good time to think and plan, kids.

-- 
James Cameron
http://quozl.linux.org.au/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: launcher-disable.patch
Type: text/x-diff
Size: 967 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20101028/c295ae72/attachment.patch>


More information about the Sugar-devel mailing list