<div dir="ltr"><a href="https://github.com/walterbender/turtleblocksjs/tree/speed-tests">https://github.com/walterbender/turtleblocksjs/tree/speed-tests</a> 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.<br><div><br></div><div>-walter</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 25, 2016 at 2:51 PM, Walter Bender <span dir="ltr"><<a href="mailto:walter.bender@gmail.com" target="_blank">walter.bender@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Sat, Jun 25, 2016 at 10:30 AM, Sahil Hindwani Hindwani <span dir="ltr"><<a href="mailto:iit2014088@iiita.ac.in" target="_blank">iit2014088@iiita.ac.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi,<div>i am new to opensource.Can anyone guide me on how should i approach.</div></div></blockquote><div><br></div></span><div>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.</div><div><br></div><div> Any help/ideas much appreciated.</div><div><br></div><div>-walter</div><div><br></div><div>[1] <a href="https://github.com/walterbender/turtleblocksjs" target="_blank">https://github.com/walterbender/turtleblocksjs</a></div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 25, 2016 at 7:00 PM, Walter Bender <span dir="ltr"><<a href="mailto:walter.bender@gmail.com" target="_blank">walter.bender@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">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.<div><br></div><div>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.</div><div><br></div><div>-walter</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Sat, Jun 25, 2016 at 9:17 AM, Lionel Laské <span dir="ltr"><<a href="mailto:lionel.laske@gmail.com" target="_blank">lionel.laske@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr"><div><br></div>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.<div>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, ...</div><span><font color="#888888"><div><br></div><div>            Lionel.</div></font></span><span><div><br><div><br><div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-22 23:01 GMT+02:00  <span dir="ltr"><<a href="mailto:sugar-devel-request@lists.sugarlabs.org" target="_blank">sugar-devel-request@lists.sugarlabs.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
<br>
I've been using Easeljs for Turtle Blocks JS and have for the most part<br>
been ignoring the performance issues. It works really well for separating<br>
the blocks, buttons, etc. from the actual graphics drawn by the Turtle. But<br>
I am at the point where the turtle graphics performance is not adequate.<br>
<br>
The problem is, each time I draw, the accumulated rendering gets redrawn,<br>
so over time, the turtle crawls along. Further, even when I first start<br>
drawing, the performance is more than 100% slower than drawing directly to<br>
the canvas.<br>
<br>
I'm doing what I think it recommended practice by Easeljs:<br>
<br>
turtleCanvas = new createjs.Shape();<br>
stage.addChild(turtleCanvas);<br>
<br>
various calls of the sort:<br>
<br>
turtleCanvas.graphics.moveTo<br>
turtleCanvas.grpahics.lineTo<br>
<br>
I've trted using cache to cache the shape, but that seems to be even slower.<br>
<br>
Just writing to the canvas context is much faster, but I don't know how to<br>
combine the two worlds.<br>
<br>
Any suggestions?<br>
<br>
The code in question is in turtle.js in<br>
<a href="http://github.com/walterbender/turtleblocksjs/js" rel="noreferrer" target="_blank">github.com/walterbender/turtleblocksjs/js</a><br>
<br>
-walter<br>
<br></blockquote></div></div></div></div></div></span></div>
<br></div></div>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" rel="noreferrer" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div><font><font>Walter Bender</font></font><br><font><font>Sugar Labs</font></font></div><div><font><a href="http://www.sugarlabs.org" target="_blank"><font>http://www.sugarlabs.org</font></a></font><br><a href="http://www.sugarlabs.org" target="_blank"><font></font></a><br></div></div></div>
</font></span></div>
<br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" rel="noreferrer" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div></div></div><div><div class="h5"><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div><font><font>Walter Bender</font></font><br><font><font>Sugar Labs</font></font></div><div><font><a href="http://www.sugarlabs.org" target="_blank"><font>http://www.sugarlabs.org</font></a></font><br><a href="http://www.sugarlabs.org" target="_blank"><font></font></a><br></div></div></div>
</div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><font><font>Walter Bender</font></font><br><font><font>Sugar Labs</font></font></div><div><font><a href="http://www.sugarlabs.org" target="_blank"><font>http://www.sugarlabs.org</font></a></font><br><a href="http://www.sugarlabs.org" target="_blank"><font></font></a><br></div></div></div>
</div>