[Sugar-devel] [ASLO] Release Carrito-3

2014-05-22 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4744

Sugar Platform:
0.82 - 0.100

Download Now:
http://activities.sugarlabs.org/downloads/file/28955/carrito-3.xo

Release notes:
This is the first version, competed in PyWeek https://pyweek.org/e/Ecollusion/


Sugar Labs Activities
http://activities.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Happy / Sad laptop system load monitor

2014-05-22 Thread Gonzalo Odiard
Now you can limit the max number of activities opened,
that can help in this case.

Is saved in gsettings org.sugarlabs maximum-number-of-open-activities

Gonzalo


On Thu, May 22, 2014 at 7:39 PM, Sebastian Silva
wrote:

> Hi,
> I remember Sugar as deployed in Dextrose 1 had a signature happy/sad
> laptop icon and both memory / cpu load indicators.
>
> I am dogfooding Sugar again on a memory constrained laptop and am in need
> of a memory monitor, and this would be lovely.
>
> Is that code alive? Maybe it was a good idea to have by default.
>
> Regards,
> Sebastian
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>


-- 
Gonzalo Odiard

SugarLabs - Software for children learning
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Happy / Sad laptop system load monitor

2014-05-22 Thread Ignacio Rodríguez
I will make the patchs for the new Sugar when I get sugar-build working!

Thanks :)

Ignacio Rodríguez
fb.com/Ignacio.Rodriguez.UY
@NachoDeTodos 
nachoe...@gmail.com


2014-05-22 22:23 GMT-03:00 Bernie Innocenti :

> On 05/22/2014 03:39 PM, Sebastian Silva wrote:
> > Hi,
> > I remember Sugar as deployed in Dextrose 1 had a signature happy/sad
> > laptop icon and both memory / cpu load indicators.
> >
> > I am dogfooding Sugar again on a memory constrained laptop and am in
> > need of a memory monitor, and this would be lovely.
> >
> > Is that code alive? Maybe it was a good idea to have by default.
>
> The "laptop avatar" feature was controversial: the main objection I
> remember hearing was that the UI shouldn't be cluttered with low-level
> information that users shouldn't be concerned about.
>
> More interestingly, field testing in Uruguay revealed that users were
> sometimes using the feature in an unintended way: they'd purposely open
> as many activities as possible to "make the laptop cry"! Such cruelty...
> :-)
>
> Anyway, the smarter fix for system overload is automatically limiting
> the number of activities open at once, which recent versions of Sugar do.
>
> If you're still interested, the original patch was pretty simple and
> might still apply cleanly to the current Sugar:
>
>
>
> http://download.sugarlabs.org/dextrose/patches/0.88/sugar/cpu-and-memory-resource-indicator.patch
>
>
> http://download.sugarlabs.org/dextrose/patches/0.88/sugar-artwork/cpu-and-memory-indicator-icons.patch
>
> --
> Bernie Innocenti
> Sugar Labs Infrastructure Team
> http://wiki.sugarlabs.org/go/Infrastructure_Team
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Happy / Sad laptop system load monitor

2014-05-22 Thread Bernie Innocenti
On 05/22/2014 03:39 PM, Sebastian Silva wrote:
> Hi,
> I remember Sugar as deployed in Dextrose 1 had a signature happy/sad
> laptop icon and both memory / cpu load indicators.
> 
> I am dogfooding Sugar again on a memory constrained laptop and am in
> need of a memory monitor, and this would be lovely.
> 
> Is that code alive? Maybe it was a good idea to have by default.

The "laptop avatar" feature was controversial: the main objection I
remember hearing was that the UI shouldn't be cluttered with low-level
information that users shouldn't be concerned about.

More interestingly, field testing in Uruguay revealed that users were
sometimes using the feature in an unintended way: they'd purposely open
as many activities as possible to "make the laptop cry"! Such cruelty... :-)

Anyway, the smarter fix for system overload is automatically limiting
the number of activities open at once, which recent versions of Sugar do.

If you're still interested, the original patch was pretty simple and
might still apply cleanly to the current Sugar:


http://download.sugarlabs.org/dextrose/patches/0.88/sugar/cpu-and-memory-resource-indicator.patch

http://download.sugarlabs.org/dextrose/patches/0.88/sugar-artwork/cpu-and-memory-indicator-icons.patch

-- 
Bernie Innocenti
Sugar Labs Infrastructure Team
http://wiki.sugarlabs.org/go/Infrastructure_Team
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [ASLO] Release Turtle Blocks-205

2014-05-22 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4027

Sugar Platform:
0.86 - 0.100

Download Now:
http://activities.sugarlabs.org/downloads/file/28953/turtleblocks-205.xo

Release notes:
205

ENHANCEMENTS:
* Use clamp style for start and action stacks
* Warn user when running empty start stack
* More/improved "turtle cards"

BUG FIXES:
* Don't reset timer on clear (w/Alan Aguiar)
* Catch exceptions in Facebook upload




Sugar Labs Activities
http://activities.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Happy / Sad laptop system load monitor

2014-05-22 Thread Sebastian Silva

Hi,
I remember Sugar as deployed in Dextrose 1 had a signature happy/sad 
laptop icon and both memory / cpu load indicators.


I am dogfooding Sugar again on a memory constrained laptop and am in 
need of a memory monitor, and this would be lovely.


Is that code alive? Maybe it was a good idea to have by default.

Regards,
Sebastian
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] A trick to profile activities startup time

2014-05-22 Thread Gonzalo Odiard
Actually, I find this last part was a mistake from my part,
because I was testing in 0.100 in the XO,
and the code is a little different than in master.

The line 375 is:

def run_main_loop(self):
Gtk.main()

then, need continue looking.

Gonzalo





On Thu, May 22, 2014 at 6:24 PM, James Cameron  wrote:

> On Thu, May 22, 2014 at 10:10:28AM -0300, Gonzalo Odiard wrote:
> > Now, almost all the time, is spent in:
> >
> > 14.2784.2786.7416.741
> activity.py:375(run_main_loop)
> >
> > What is that?
> >
> https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/activity
> > /activity.py#L375
> >
> >  _initialize_journal_object have a nice FIXME
> >
> > # FIXME: We should be able to get an ID synchronously from the
> DS,
> > # then call async the actual create.
> > # http://bugs.sugarlabs.org/ticket/2169
> >
> >
> https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/activity
> > /activity.py#L425
> >
> > points to a bug 4 years old :(
> > (there are more information in this bug [2] 7 years old!
>
> Nice find, well done.  I don't know of anybody else having done
> profiling like this for about four years, so you may find other ways
> to improve startup time.
>
> --
> James Cameron
> http://quozl.linux.org.au/
>



-- 
Gonzalo Odiard

SugarLabs - Software for children learning
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] A trick to profile activities startup time

2014-05-22 Thread James Cameron
On Thu, May 22, 2014 at 10:10:28AM -0300, Gonzalo Odiard wrote:
> Now, almost all the time, is spent in:
> 
>         1    4.278    4.278    6.741    6.741 activity.py:375(run_main_loop)
> 
> What is that?
> https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/activity
> /activity.py#L375
> 
>  _initialize_journal_object have a nice FIXME
> 
>         # FIXME: We should be able to get an ID synchronously from the DS,
>         # then call async the actual create.
>         # http://bugs.sugarlabs.org/ticket/2169
> 
> https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/activity
> /activity.py#L425
> 
> points to a bug 4 years old :(
> (there are more information in this bug [2] 7 years old!

Nice find, well done.  I don't know of anybody else having done
profiling like this for about four years, so you may find other ways
to improve startup time.

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] A trick to profile activities startup time

2014-05-22 Thread Gonzalo Odiard
I continued profiling Abacus activity to try to see why is slow to start.

The first issue I found, was the abacus was redraw many times,
by different reasons. My patches are here [1]

* In the default case, the abacus was created, and recreated again
with the same abacus (Do not switch to a abacus already
selected
)

* The creation/modification of sprites queue the redraw of his own area,
but when all the sprites are created, that can trigger more than one draw.
I have added a method to hold the draw until all the sprites are created.
("Add a methods to allow delay of
draw"
and  "Draw only one time on activity
startup
")

Now Abacus starts in 5.4 segs in a XO-4, and in 15/16 segs in a XO-1
(previously was 22/25 segs in a XO-1)

* My final test was interesting but disappointing in the results.
The activity create the sprites defining the images as SVGs, rendering them
in pixbufs,
and painting that pixbufs in the screen. I had the theory than that could
be slow,
then added the possibility of use a ImageSurface instead of a Pixbuf in the
Sprite,
and generated the images using cairo ("Draw sprites using cairo
surfaces
")
The patch do all the changes, and the abacus is functional (with some
regressions,
like the labels are not centered), but the performance is almost the same.

This is the top 20 (on a xo-4) after all these changes:

[gonzalo@localhost abacus]$ sort -rn -k2 abacus_cairo_profile.log | head -20
14.2784.2786.7416.741 activity.py:375(run_main_loop)
  3071.0970.0041.0970.004 {method 'paint' of
'cairo.Context' objects}
3834/35860.3020.0000.5450.000 module.py:252(__getattr__)
  9950.2660.0000.2660.000 {method 'remove' of 'list'
objects}
  1550.2310.0010.4900.003
sprites.py:122(remove_from_list)
10.2150.2150.4630.463 activity.py:231(__init__)
10.2020.2022.7402.740 AbacusActivity.py:72(__init__)
  2420.1370.0010.2980.001 sprites.py:367(draw_label)
   670.1340.0020.1340.002 {method 'write' of 'file'
objects}
  2250.1240.0010.2260.001
abacus_window.py:237(_image_bead)
9815/91270.1010.0000.3100.000 {getattr}
105960.0860.0000.0860.000 {method 'append' of 'list'
objects}
19141/189380.0850.0000.0870.000 {len}
103680.0800.0000.1110.000 sprites.py:98(get_sprite)
  207/1750.0790.0000.4080.002 module.py:110(__getattr__)
   440.0770.0020.2360.005 icon.py:133(_get_icon_info)
  3320.0710.0000.0710.000 {method 'get_g_type' of
'gi.RegisteredTypeInfo' objects}
  2800.0680.0001.4190.005 sprites.py:324(draw)
   310.0670.0020.0670.002 {method
'send_message_with_reply_and_block' of '_dbus_bindings.Connection' objects}
   298/250.0590.0000.1020.004
types.py:142(find_vfunc_conflict_in_bases)


Now, almost all the time, is spent in:

14.2784.2786.7416.741 activity.py:375(run_main_loop)

What is that?
https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/activity/activity.py#L375

 _initialize_journal_object have a nice FIXME

# FIXME: We should be able to get an ID synchronously from the DS,
# then call async the actual create.
# http://bugs.sugarlabs.org/ticket/2169

https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/activity/activity.py#L425

points to a bug 4 years old :(
(there are more information in this bug [2] 7 years old!

I will try profile the datastore part. That have the potential of improve
the startup time of all the activities.
Of course, If anybody else want help is welcomed.

Gonzalo


[1] https://github.com/godiard/abacus/commits/master
[2] https://dev.laptop.org/ticket/3071


On Tue, May 20, 2014 at 10:45 AM, Gonzalo Odiard wrote:

> One trick is the following (example using the Abacus activity):
>
> * In sugar, start one activity
> * without close the activity, go tot the terminal, and see the command
> line used to run it
> $ ps ax | grep Abacus
> 2250  ? Sl 0:10  python2 /usr/bin/sugar-activity
> AbacusActivity.AbacusActivity -b org.sugarlabs.AbacusActivity -a
> ff8dc731a329b184b7d28c40cc85c47ff2e433cb -o
> 7ae05000-b61c-4fd8-9b66-e5125f3ba81f > abacus_profile.log
>
> * close the activity you want profile.
> * in the terminal do:
> $ cd Activities/Abacus.activity
> $ python2 *-m cProfile */usr/bin/sugar-activity
> AbacusActivity.AbacusActivity -b org.sugarlabs.AbacusActivity -a
> ff8dc

Re: [Sugar-devel] Small issues with Sugar 0.102

2014-05-22 Thread Iain Brown Douglas
On Sat, 2014-05-17 at 02:34 -0300, Ignacio Rodríguez wrote:
> About 4751 I remember to have the same problem on first try to port
> icon_size to pixel_size
> 
> http://people.sugarlabs.org/ignacio/Without%20IconSize.png
> 
I am seeing #4751 and #4673 in osbuild at present (but my osbuild is not
error free).

What I am seeing in osbuild, and referring to the above screenshot, (ref
#4751) is:

the actual icon is 27 pixels wide, same as I expect
the "original Frame" appears as expected 54 / 56 pixels wide,
the "distorted Frame", say 72 pixels wide, takes its distortion from the
"carrier".

By "carrier" I refer partially to the grey background of the clipping,
but more specifically the "area_highlighted_on_select".

[I am not sure of my use of the word "palette" in this context. Does
palette="area_highlighted_on_select"?]

Is it right to say that the frame is distorted by the palette, rather
than the icon?

> So, I think this is a problem of pixel_size
> 
So, is it a problem of the pixel_size in the palette, rather than
pixel_size in the icon?



> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel