Re: [Sugar-devel] performance issues with Easeljs

2016-06-25 Thread Walter Bender
https://github.com/walterbender/turtleblocksjs/tree/speed-tests is there
branch where I create a separate shape for each line and cache as I go
along. Helps when drawing lines that don't overlap very much but slows
things down even more when there is a lot of overlap.

-walter

On Sat, Jun 25, 2016 at 2:51 PM, Walter Bender 
wrote:

>
>
> On Sat, Jun 25, 2016 at 10:30 AM, Sahil Hindwani Hindwani <
> iit2014...@iiita.ac.in> wrote:
>
>> Hi,
>> i am new to opensource.Can anyone guide me on how should i approach.
>>
>
> Maybe you can clone my repo [1] (I'll also push the branch where I have
> been experimenting with speed ups) and see if you can figure out some
> better way of rendering from the Turtle. All the relevant code will be in
> turtle.js.
>
>  Any help/ideas much appreciated.
>
> -walter
>
> [1] https://github.com/walterbender/turtleblocksjs
>
>>
>> On Sat, Jun 25, 2016 at 7:00 PM, Walter Bender 
>> wrote:
>>
>>> I agree that I could/should use more HTML rather than depend on Easel
>>> for everything. But that doesn't seem to be related to the issues I am
>>> experiencing.
>>>
>>> I've tried numerous combinations of caching, layering of shapes,
>>> breaking up large elements, etc. Many help in some circumstances but lead
>>> to serious degradation in others. I will step away from it for a bit and
>>> hopefully come back with fresh eyes.
>>>
>>> -walter
>>>
>>> On Sat, Jun 25, 2016 at 9:17 AM, Lionel Laské 
>>> wrote:
>>>

 One other issue could be that everything (menus, palettes, blocks,
 drawing, ...) in TurtleJS are drawing objects. So you don't use any HTML
 elements that the browser is probably optimized to handle.
 I guess it could be more efficient to don't rely only on Easeljs/Canvas
 but also to mix it with true HTML elements like buttons, images, ...

 Lionel.



 2016-06-22 23:01 GMT+02:00 :

>
>
> I've been using Easeljs for Turtle Blocks JS and have for the most part
> been ignoring the performance issues. It works really well for
> separating
> the blocks, buttons, etc. from the actual graphics drawn by the
> Turtle. But
> I am at the point where the turtle graphics performance is not
> adequate.
>
> The problem is, each time I draw, the accumulated rendering gets
> redrawn,
> so over time, the turtle crawls along. Further, even when I first start
> drawing, the performance is more than 100% slower than drawing
> directly to
> the canvas.
>
> I'm doing what I think it recommended practice by Easeljs:
>
> turtleCanvas = new createjs.Shape();
> stage.addChild(turtleCanvas);
>
> various calls of the sort:
>
> turtleCanvas.graphics.moveTo
> turtleCanvas.grpahics.lineTo
>
> I've trted using cache to cache the shape, but that seems to be even
> slower.
>
> Just writing to the canvas context is much faster, but I don't know
> how to
> combine the two worlds.
>
> Any suggestions?
>
> The code in question is in turtle.js in
> github.com/walterbender/turtleblocksjs/js
>
> -walter
>
>
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel


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



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org

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


Re: [Sugar-devel] performance issues with Easeljs

2016-06-25 Thread Walter Bender
On Sat, Jun 25, 2016 at 10:30 AM, Sahil Hindwani Hindwani <
iit2014...@iiita.ac.in> wrote:

> Hi,
> i am new to opensource.Can anyone guide me on how should i approach.
>

Maybe you can clone my repo [1] (I'll also push the branch where I have
been experimenting with speed ups) and see if you can figure out some
better way of rendering from the Turtle. All the relevant code will be in
turtle.js.

 Any help/ideas much appreciated.

-walter

[1] https://github.com/walterbender/turtleblocksjs

>
> On Sat, Jun 25, 2016 at 7:00 PM, Walter Bender 
> wrote:
>
>> I agree that I could/should use more HTML rather than depend on Easel for
>> everything. But that doesn't seem to be related to the issues I am
>> experiencing.
>>
>> I've tried numerous combinations of caching, layering of shapes, breaking
>> up large elements, etc. Many help in some circumstances but lead to serious
>> degradation in others. I will step away from it for a bit and hopefully
>> come back with fresh eyes.
>>
>> -walter
>>
>> On Sat, Jun 25, 2016 at 9:17 AM, Lionel Laské 
>> wrote:
>>
>>>
>>> One other issue could be that everything (menus, palettes, blocks,
>>> drawing, ...) in TurtleJS are drawing objects. So you don't use any HTML
>>> elements that the browser is probably optimized to handle.
>>> I guess it could be more efficient to don't rely only on Easeljs/Canvas
>>> but also to mix it with true HTML elements like buttons, images, ...
>>>
>>> Lionel.
>>>
>>>
>>>
>>> 2016-06-22 23:01 GMT+02:00 :
>>>


 I've been using Easeljs for Turtle Blocks JS and have for the most part
 been ignoring the performance issues. It works really well for
 separating
 the blocks, buttons, etc. from the actual graphics drawn by the Turtle.
 But
 I am at the point where the turtle graphics performance is not adequate.

 The problem is, each time I draw, the accumulated rendering gets
 redrawn,
 so over time, the turtle crawls along. Further, even when I first start
 drawing, the performance is more than 100% slower than drawing directly
 to
 the canvas.

 I'm doing what I think it recommended practice by Easeljs:

 turtleCanvas = new createjs.Shape();
 stage.addChild(turtleCanvas);

 various calls of the sort:

 turtleCanvas.graphics.moveTo
 turtleCanvas.grpahics.lineTo

 I've trted using cache to cache the shape, but that seems to be even
 slower.

 Just writing to the canvas context is much faster, but I don't know how
 to
 combine the two worlds.

 Any suggestions?

 The code in question is in turtle.js in
 github.com/walterbender/turtleblocksjs/js

 -walter


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


-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org

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


Re: [Sugar-devel] performance issues with Easeljs

2016-06-25 Thread Sahil Hindwani Hindwani
Hi,
i am new to opensource.Can anyone guide me on how should i approach.

On Sat, Jun 25, 2016 at 7:00 PM, Walter Bender 
wrote:

> I agree that I could/should use more HTML rather than depend on Easel for
> everything. But that doesn't seem to be related to the issues I am
> experiencing.
>
> I've tried numerous combinations of caching, layering of shapes, breaking
> up large elements, etc. Many help in some circumstances but lead to serious
> degradation in others. I will step away from it for a bit and hopefully
> come back with fresh eyes.
>
> -walter
>
> On Sat, Jun 25, 2016 at 9:17 AM, Lionel Laské 
> wrote:
>
>>
>> One other issue could be that everything (menus, palettes, blocks,
>> drawing, ...) in TurtleJS are drawing objects. So you don't use any HTML
>> elements that the browser is probably optimized to handle.
>> I guess it could be more efficient to don't rely only on Easeljs/Canvas
>> but also to mix it with true HTML elements like buttons, images, ...
>>
>> Lionel.
>>
>>
>>
>> 2016-06-22 23:01 GMT+02:00 :
>>
>>>
>>>
>>> I've been using Easeljs for Turtle Blocks JS and have for the most part
>>> been ignoring the performance issues. It works really well for separating
>>> the blocks, buttons, etc. from the actual graphics drawn by the Turtle.
>>> But
>>> I am at the point where the turtle graphics performance is not adequate.
>>>
>>> The problem is, each time I draw, the accumulated rendering gets redrawn,
>>> so over time, the turtle crawls along. Further, even when I first start
>>> drawing, the performance is more than 100% slower than drawing directly
>>> to
>>> the canvas.
>>>
>>> I'm doing what I think it recommended practice by Easeljs:
>>>
>>> turtleCanvas = new createjs.Shape();
>>> stage.addChild(turtleCanvas);
>>>
>>> various calls of the sort:
>>>
>>> turtleCanvas.graphics.moveTo
>>> turtleCanvas.grpahics.lineTo
>>>
>>> I've trted using cache to cache the shape, but that seems to be even
>>> slower.
>>>
>>> Just writing to the canvas context is much faster, but I don't know how
>>> to
>>> combine the two worlds.
>>>
>>> Any suggestions?
>>>
>>> The code in question is in turtle.js in
>>> github.com/walterbender/turtleblocksjs/js
>>>
>>> -walter
>>>
>>>
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
>
>
> --
> Walter Bender
> Sugar Labs
> http://www.sugarlabs.org
> 
>
> ___
> 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] performance issues with Easeljs

2016-06-25 Thread Walter Bender
I agree that I could/should use more HTML rather than depend on Easel for
everything. But that doesn't seem to be related to the issues I am
experiencing.

I've tried numerous combinations of caching, layering of shapes, breaking
up large elements, etc. Many help in some circumstances but lead to serious
degradation in others. I will step away from it for a bit and hopefully
come back with fresh eyes.

-walter

On Sat, Jun 25, 2016 at 9:17 AM, Lionel Laské 
wrote:

>
> One other issue could be that everything (menus, palettes, blocks,
> drawing, ...) in TurtleJS are drawing objects. So you don't use any HTML
> elements that the browser is probably optimized to handle.
> I guess it could be more efficient to don't rely only on Easeljs/Canvas
> but also to mix it with true HTML elements like buttons, images, ...
>
> Lionel.
>
>
>
> 2016-06-22 23:01 GMT+02:00 :
>
>>
>>
>> I've been using Easeljs for Turtle Blocks JS and have for the most part
>> been ignoring the performance issues. It works really well for separating
>> the blocks, buttons, etc. from the actual graphics drawn by the Turtle.
>> But
>> I am at the point where the turtle graphics performance is not adequate.
>>
>> The problem is, each time I draw, the accumulated rendering gets redrawn,
>> so over time, the turtle crawls along. Further, even when I first start
>> drawing, the performance is more than 100% slower than drawing directly to
>> the canvas.
>>
>> I'm doing what I think it recommended practice by Easeljs:
>>
>> turtleCanvas = new createjs.Shape();
>> stage.addChild(turtleCanvas);
>>
>> various calls of the sort:
>>
>> turtleCanvas.graphics.moveTo
>> turtleCanvas.grpahics.lineTo
>>
>> I've trted using cache to cache the shape, but that seems to be even
>> slower.
>>
>> Just writing to the canvas context is much faster, but I don't know how to
>> combine the two worlds.
>>
>> Any suggestions?
>>
>> The code in question is in turtle.js in
>> github.com/walterbender/turtleblocksjs/js
>>
>> -walter
>>
>>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>


-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org

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


Re: [Sugar-devel] performance issues with Easeljs

2016-06-25 Thread Lionel Laské
One other issue could be that everything (menus, palettes, blocks, drawing,
...) in TurtleJS are drawing objects. So you don't use any HTML elements
that the browser is probably optimized to handle.
I guess it could be more efficient to don't rely only on Easeljs/Canvas but
also to mix it with true HTML elements like buttons, images, ...

Lionel.



2016-06-22 23:01 GMT+02:00 :

>
>
> I've been using Easeljs for Turtle Blocks JS and have for the most part
> been ignoring the performance issues. It works really well for separating
> the blocks, buttons, etc. from the actual graphics drawn by the Turtle. But
> I am at the point where the turtle graphics performance is not adequate.
>
> The problem is, each time I draw, the accumulated rendering gets redrawn,
> so over time, the turtle crawls along. Further, even when I first start
> drawing, the performance is more than 100% slower than drawing directly to
> the canvas.
>
> I'm doing what I think it recommended practice by Easeljs:
>
> turtleCanvas = new createjs.Shape();
> stage.addChild(turtleCanvas);
>
> various calls of the sort:
>
> turtleCanvas.graphics.moveTo
> turtleCanvas.grpahics.lineTo
>
> I've trted using cache to cache the shape, but that seems to be even
> slower.
>
> Just writing to the canvas context is much faster, but I don't know how to
> combine the two worlds.
>
> Any suggestions?
>
> The code in question is in turtle.js in
> github.com/walterbender/turtleblocksjs/js
>
> -walter
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] 'Save As' on Activity close.

2016-06-25 Thread Ütkarsh Tiwari
Hi everyone,
This gif is quite outdated. I have madu much progress
unlike what is show in gif(it's just intended to give an holistic view of
the UI).

@Mr. Anderson - I have tested this on 'paint' and 'write' as well and on
clicking 'discard' the activiry doesn't save any document.

Regards,
Ütkarsh Tiwari
On Jun 25, 2016 3:48 PM, "Sam Parkinson"  wrote:

> Hi Utkrash,
>
> Here is my 2c:
>
> * How is this implemented?  As part of the sugar-web toolkit?  Will you
> also write it for sugar-toolkit-gk3?
> * Can the cancel be renamed to delete (and have a trash icon)
> * Can you use a PopWindow?
> * Can you put a box to write a description as well as the title?
>
> Thanks,
> Sam
>
> On Sat, Jun 25, 2016 at 7:45 PM, Ütkarsh Tiwari <
> iamutkarshtiw...@gmail.com> wrote:
>
> Hi, I have designed the 'Save As' alert UI (gif attached below) and have
> implemented 'discard' and 'entry-text' options by now.. Please have a look
> and share your suggestions.
> --
> Regards, Ütkarsh Tiwari
> ___ 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] [DESIGN] 'Save As' on Activity close.

2016-06-25 Thread Tony Anderson

Hi, Sam

So far this project is working with Python Sugar activities. It is 
intended to work identically in sugar and sugar3.


I am completely confused by the PopWindow business. I like the look and 
feel of our existing alerts. Naturally, if Sugar
decides to do away with alerts and replace all of them with this 
PopWindow, ok. So far I don't see that happening.

One of Sugar's features is a simple and consistent interface for the user.

The goal of 'save as' is to have objects in the Journal identified by a 
name supplied by the user. This doesn't apply to the description.
An improvement to the Journal interface would be to move the 'detail' 
button to the left side of the screen so that it is more easily
visible and accessible to the user. In this case the description would 
be more likely to be seen and provided.


The choice of text on the choices should probably be something like: 
save and quit. If the user enters a name in the entry (with an 'enter'), 
the
alert should accept that as a save. If the user clicks on quit, the quit 
action should be completed. In either case the metadata file is saved as
at present, so discard would be inappropriate. However, a quit without a 
user supplied name should not save the document. (If the user doesn't 
care to give it a name it can be assumed not to be important enough to 
save).


Tony

On 06/25/2016 12:18 PM, Sam Parkinson wrote:

Hi Utkrash,

Here is my 2c:

* How is this implemented?  As part of the sugar-web toolkit?  Will 
you also write it for sugar-toolkit-gk3?

* Can the cancel be renamed to delete (and have a trash icon)
* Can you use a PopWindow?
* Can you put a box to write a description as well as the title?

Thanks,
Sam

On Sat, Jun 25, 2016 at 7:45 PM, Ütkarsh Tiwari 
 wrote:
Hi, I have designed the 'Save As' alert UI (gif attached below) and 
have implemented 'discard' and 'entry-text' options by now.. Please 
have a look and share your suggestions.

--
Regards, Ütkarsh Tiwari
___ 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


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


Re: [Sugar-devel] [DESIGN] 'Save As' on Activity close.

2016-06-25 Thread Sam Parkinson

Hi Utkrash,

Here is my 2c:

* How is this implemented?  As part of the sugar-web toolkit?  Will you 
also write it for sugar-toolkit-gk3?

* Can the cancel be renamed to delete (and have a trash icon)
* Can you use a PopWindow?
* Can you put a box to write a description as well as the title?

Thanks,
Sam

On Sat, Jun 25, 2016 at 7:45 PM, Ütkarsh Tiwari 
 wrote:

Hi,
I have designed the 'Save As' alert UI (gif attached below) and
have implemented 'discard' and 'entry-text' options by now.. Please
have a look and share your suggestions.
--
Regards,
Ütkarsh Tiwari
___
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] [DESIGN] 'Save As' on Activity close.

2016-06-25 Thread Tony Anderson

Hi, Utkarsh

Probably Write or Paint would be a better example. This activity doesn't 
save a document.


I am still totally confused on this matter of alerts. This alert is fine 
but doesn't look like what I had understood became the standard. For 
consistency I think

the 'save as' alert should look and feel like the screenshot alert.

Tony

On 06/25/2016 11:45 AM, Ütkarsh Tiwari wrote:

Hi,
 I have designed the 'Save As' alert UI (gif attached below) and
have implemented 'discard' and 'entry-text' options by now.. Please
have a look and share your suggestions.


___
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] [DESIGN] 'Save As' on Activity close.

2016-06-25 Thread Sebastian Silva


El 25/06/16 a las 04:50, Ütkarsh Tiwari escribió:
> The 'discard/cancel' option is meant to
> discard/delete the datafiles saved on activity close. This alerts just
> halts the closing procedure until the user provides his choice (save
> with a new name or discard saving the datafiles).
In that case the appropriate word is likely 'discard'.

I wonder if this makes it too easy to loose work.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] 'Save As' on Activity close.

2016-06-25 Thread Ütkarsh Tiwari
Hi Sebastian,
 Nopes. The 'discard/cancel' option is meant to
discard/delete the datafiles saved on activity close. This alerts just
halts the closing procedure until the user provides his choice (save
with a new name or discard saving the datafiles).

Regards,
Utkasrh Tiwari

On 6/25/16, Sebastian Silva  wrote:
> Interesting! Does 'cancel' dicard? It should be labeled so! I would
> assume 'cancel' results in going back to the activity, not closing it.
>
> Regards,
>
> Sebastian
>
>
> El 25/06/16 a las 04:45, Ütkarsh Tiwari escribió:
>> Hi,
>> I have designed the 'Save As' alert UI (gif attached below) and
>> have implemented 'discard' and 'entry-text' options by now.. Please
>> have a look and share your suggestions.
>>
>>
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>


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


Re: [Sugar-devel] [DESIGN] 'Save As' on Activity close.

2016-06-25 Thread Sebastian Silva
Interesting! Does 'cancel' dicard? It should be labeled so! I would
assume 'cancel' results in going back to the activity, not closing it.

Regards,

Sebastian


El 25/06/16 a las 04:45, Ütkarsh Tiwari escribió:
> Hi,
> I have designed the 'Save As' alert UI (gif attached below) and
> have implemented 'discard' and 'entry-text' options by now.. Please
> have a look and share your suggestions.
>
>
> ___
> 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