[Sugar-devel] Sugar-install-bundle in 13.2.5 is slooow

Martin Abente martin.abente.lahaye at gmail.com
Mon Aug 31 13:03:19 EDT 2015


The problem caused by the race condition is that the activities were not
refreshed in Sugar activities list when updated or, not added to the list
when installed. By race condition I mean the situation where the
BundleRegistry detects changes (e.g. in ~/Activities) too early, when
activity.info is not available yet, so the bundle gets ignored. I
personally don't think is related to this issue.

Now, looking at Tony's report and Sam's confirmation that this issue is
related to the change in [1], my first guess would be that the problem is
caused by the overhead generated by initializing the BundleRegistry, and
any other sugar module imported by it, every time the sugar-install-bundle
script is executed. Note that the script runs in a different process than
the sugar shell, so the registry instance returned by get_registry() is not
the same one as the one in the shell. Having SUGAR_PROFILE set doesn't
necessarily mean the script is being executed in the same context as the
shell.

If my guess is confirmed, we should revise that change or revert it.

Refs:
1.
https://github.com/sugarlabs/sugar/commit/64b4b2fba1c37a9ad92ed30eb669b68552b62415

On Mon, Aug 31, 2015 at 9:02 AM, Gonzalo Odiard <godiard at gmail.com> wrote:

> I am wondering if this issue ca be related to the race condition detected
> by Martin when the file monitor detect the activity before the
> activity.info file
> is saved to disk.
>
> Martin, do you have a patch to test?
>
> Gonzalo
>
> On Mon, Aug 31, 2015 at 10:00 AM, Gonzalo Odiard <godiard at gmail.com>
> wrote:
>
>> Tony,
>> If you can enable logging (remove the comment in the line
>> SUGAR_LOGGER_LEVEL
>> in the file /home/olpc/.sugar/default/debug)
>> And install one of the activities without unset the SUGAR_PROFILE env
>> variable,
>> and send the log, maybe we can understand better what is happening.
>>
>> I am afraid the slowness will impact Browse even if you patch it, because
>> Browse process
>> run in a environment with the env variable set.
>>
>> One more question: the time is bigger in slower devices (XO-1) than in
>> XO-4,
>> or is independent of the hardware performance?
>>
>> Gonzalo
>>
>>
>> On Sun, Aug 30, 2015 at 7:34 PM, James Cameron <quozl at laptop.org> wrote:
>>
>>> G'day Sam,
>>>
>>> Adding a flag for a workaround seems like you've given up.  ;-)
>>>
>>> Wouldn't it be better to fix the problem?  As you can see from
>>> #4849 it occurs in Sugar, and only inside Terminal activity.
>>>
>>> Why is it happening?
>>>
>>> Why does it take up to 24 minutes to install Browse using Terminal?
>>>
>>> Why does it take up to 5 minutes to install in Sugar 0.98?
>>>
>>> And yet only half a second if the bundle registry is bypassed?
>>>
>>> The bundle registry can't be that slow.
>>>
>>> By understanding the problem we'll be able to say whether it is
>>> causing any other slowness of Sugar.
>>>
>>> --
>>> James Cameron
>>> http://quozl.linux.org.au/
>>> _______________________________________________
>>> Sugar-devel mailing list
>>> Sugar-devel at lists.sugarlabs.org
>>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>>
>>
>>
>>
>> --
>> Gonzalo Odiard
>>
>>
>
>
> --
> Gonzalo Odiard
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20150831/f56d3bae/attachment.html>


More information about the Sugar-devel mailing list