Hello James,<br><br>I was going through the discussion over the bug #2080 handled currently by Anurag.<br><br>I too was thinking of replacing the animation algo, which currently is sine function.<br>I was having some questions in mind after looking at your research.<br>
"When launcher is disabled, the time saving is more, as compared to SVG complexity."<br><br>If we are not for removing animation, then why not use a simple integer based algorithm instead of a floating based sine algorithm. In terms of graphics, integer based algorithms (Bresenham, Mid-point, etc) work faster than floating point based.<br>
<br>If we can use a 'Busy-Cursor' then its fine.<br>But if we still want to continue with the animation, why not change the algorithm for the animation that is done?<br><br>Regards,<br>Dipankar<br><br><div class="gmail_quote">
On Thu, Oct 28, 2010 at 9:04 AM, James Cameron <span dir="ltr"><<a href="mailto:quozl@laptop.org">quozl@laptop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Earlier in the context of SL#2080 patch review, I had said "the<br>
launcher is stealing CPU cycles from the startup of the activity, the<br>
task run queue shows this during a launch. I wonder if activities<br>
might start up faster if there was no launcher, just a busy cursor."<br>
<br>
Looks like activities would start faster; between one and four seconds,<br>
mostly depending on the activity, and slightly depending on the icon<br>
complexity.<br>
<br>
Details below.<br>
<br>
--<br>
<br>
Research: will activities start faster if there is no launcher?<br>
<br>
Method: using an XO-1, freshly installed with Sugar 0.84.22, as part<br>
of OLPC OS 10.1.2 build os852, test the startup time of three<br>
activities (Memorize, Moon and Chat), remove the launcher, retest,<br>
subtract.<br>
<br>
The launcher is implemented by source file launcher.py in<br>
/usr/lib/python2.6/site-packages/jarabe/view/ ... the modification<br>
made is attached as a patch.<br>
<br>
The times were captured with a stopwatch. The timing began when "Start"<br>
was selected from the list view, and ended once the activity had<br>
completed display of the UI.<br>
<br>
Result:<br>
<br>
a. unmodified launcher.py<br>
<br>
Memorize-34 9.43s, 9.56s, 9.51s<br>
Moon-11 11.58s, 11.60s, 11.65s<br>
Chat-65 6.65s, 6.54s, 6.59s<br>
<br>
b. modified launcher.py (black background, no animation),<br>
<br>
Memorize-34 7.60s, 7.63s, 7.60s<br>
Moon-11 7.78s, 7.78s, 7.95s<br>
Chat-65 5.04s, 4.93s, 4.88s<br>
<br>
c. calculated cost of launcher<br>
<br>
Memorize-34 1.89s<br>
Moon-11 3.73s<br>
Chat-65 1.64s<br>
<br>
Diagnosis: removing the launcher animation saved between one and four<br>
seconds of startup time. The saving was greatest for the Moon activity.<br>
<br>
--<br>
<br>
Research: determine if the SVG icon for the Moon activity contributes<br>
to the delay.<br>
<br>
Method: swap the icons, restart Sugar, retest only Chat activity with<br>
Moon icon.<br>
<br>
Result:<br>
<br>
a. unmodified launcher.py<br>
<br>
Chat-65 7.83s, 7.59s, 7.62s<br>
<br>
b. modified launcher.py (black background, no animation),<br>
<br>
Chat-65 4.99s, 4.87s, 4.90s<br>
<br>
c. calculated cost of launcher<br>
<br>
Chat-65 2.75s (greater than previous)<br>
<br>
d. calculated cost of moon icon over chat icon<br>
<br>
Chat-65 1.09s<br>
<br>
Diagnosis: the degree of saving has a little to do with the SVG icon<br>
complexity. The degree of saving has much to do with the mix of<br>
operations performed by the activity during startup.<br>
<br>
--<br>
<br>
So, between 23 and 92 wasted days of looking at the launcher across<br>
two million laptops. Good time to think and plan, kids.<br>
<font color="#888888"><br>
--<br>
James Cameron<br>
<a href="http://quozl.linux.org.au/" target="_blank">http://quozl.linux.org.au/</a><br>
</font><br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br>