<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 22, 2016 at 5:01 PM, Gonzalo Odiard <span dir="ltr"><<a href="mailto:godiard@gmail.com" target="_blank">godiard@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">The only tip I can imagine is use the cache in the different DisplayObjects<div>to avoid redraw when not needed. In your case, probably group by toolbars,</div><div>blocks, canvas and so, and not redraw all, but the group updated.</div><div><br></div><div>Did you found this article? </div><div><a href="https://blog.toggl.com/2013/05/6-performance-tips-for-html-canvas-and-createjs/" target="_blank">https://blog.toggl.com/2013/05/6-performance-tips-for-html-canvas-and-createjs/</a> </div></div></blockquote><div><br></div><div>Yes. I read that article. </div><div><br></div><div>Right now I am experimenting with using a separate Shape for each line. I tried caching each of those shapes after the rendering is complete but it didn't seem to help. Digging deeper.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 22, 2016 at 5:52 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"><div class="gmail_extra"><br><div class="gmail_quote"><span>On Wed, Jun 22, 2016 at 4:51 PM, Gonzalo Odiard <span dir="ltr"><<a href="mailto:godiard@gmail.com" target="_blank">godiard@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">Hi Walter,<div>Is this a problem with a modern browser, or using it on Android?</div></div></blockquote><div><br></div></span><div>Browser (Chrome is where I am testing) </div><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Gonzalo</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Wed, Jun 22, 2016 at 5:28 PM, Walter Bender <span dir="ltr"><<a href="mailto:walter.bender@gmail.com" target="_blank">walter.bender@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">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.<div><br></div><div>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.</div><div><br></div><div>I'm doing what I think it recommended practice by Easeljs:</div><div><br></div><div>turtleCanvas = new createjs.Shape();</div><div>stage.addChild(turtleCanvas);</div><div><br></div><div>various calls of the sort:</div><div><br></div><div>turtleCanvas.graphics.moveTo</div><div>turtleCanvas.grpahics.lineTo<br clear="all"><div><br></div><div>I've trted using cache to cache the shape, but that seems to be even slower.</div><div><br></div><div>Just writing to the canvas context is much faster, but I don't know how to combine the two worlds.</div><div><br></div><div>Any suggestions?</div><div><br></div><div>The code in question is in turtle.js in <a href="http://github.com/walterbender/turtleblocksjs/js" target="_blank">github.com/walterbender/turtleblocksjs/js</a></div><span><font color="#888888"><div><br></div><div>-walter</div><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></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><table border="0" cellpadding="0" cellspacing="0" width="470" style="color:rgb(136,136,136);font-size:12.8px;font-family:'Times New Roman';width:470px"><tbody><tr valign="top"><td style="padding-left:10px;width:10px;padding-right:10px"><img src="https://s3.amazonaws.com/ucwebapp.wisestamp.com/a2cdffca-bc96-4966-b4fa-c3fa79edb131/12112365_414949315381645_4106803690337175030_n.format_png.resize_120x.png" alt="photo" height=" " width="65" style="border-radius:4px;width:65px;max-width:120px"></td><td style="border-right-width:0px;border-right-style:solid;border-right-color:rgb(69,102,142)"></td><td style="font-family:Arial;text-align:initial;font-stretch:normal;font-size:14px;color:rgb(100,100,100);padding:0px 10px"><div><b>Gonzalo Odiard</b><br>Lider de proyecto</div><div style="color:rgb(141,141,141);font-size:13px;padding:5px 0px"><a href="tel:tel.:+4210-7748" style="color:rgb(141,141,141);text-decoration:none" target="_blank">tel.: 4210-7748</a> | <span style="text-align:initial;white-space:nowrap;display:inline-block"><a href="http://www.trinom.io/" style="color:rgb(141,141,141);text-decoration:none" target="_blank">www.trinom.io</a></span><span style="text-align:initial"> </span><span style="text-align:initial"> </span><span style="text-align:initial"> </span><span style="text-align:initial;color:rgb(69,102,142);display:inline-block"></span><span style="text-align:initial"> </span><span style="text-align:initial;display:inline-block">Av Calchaqui 4936· 2do Piso. Quilmes</span></div><div style="margin-top:5px"><a href="http://www.facebook.com/trinomiosrl" target="_blank"><img src="https://s3.amazonaws.com/images.wisestamp.com/icons_32/facebook.png" width="16" style="border-radius:0px;border:0px;width:16px"></a> <a href="https://www.linkedin.com/company/trinom-io" target="_blank"><img src="https://s3.amazonaws.com/images.wisestamp.com/icons_32/linkedin.png" width="16" alt="" style="border-radius:0px;border:0px;width:16px"></a></div><div><br></div></td></tr></tbody></table></div></div></div>
</font></span></div>
</blockquote></div></div></div><div><div><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 data-smartmail="gmail_signature"><div dir="ltr"><div><table border="0" cellpadding="0" cellspacing="0" width="470" style="color:rgb(136,136,136);font-size:12.8px;font-family:'Times New Roman';width:470px"><tbody><tr valign="top"><td style="padding-left:10px;width:10px;padding-right:10px"><img src="https://s3.amazonaws.com/ucwebapp.wisestamp.com/a2cdffca-bc96-4966-b4fa-c3fa79edb131/12112365_414949315381645_4106803690337175030_n.format_png.resize_120x.png" alt="photo" height=" " width="65" style="border-radius:4px;width:65px;max-width:120px"></td><td style="border-right-width:0px;border-right-style:solid;border-right-color:rgb(69,102,142)"></td><td style="font-family:Arial;text-align:initial;font-stretch:normal;font-size:14px;color:rgb(100,100,100);padding:0px 10px"><div><b>Gonzalo Odiard</b><br>Lider de proyecto</div><div style="color:rgb(141,141,141);font-size:13px;padding:5px 0px"><a href="tel:tel.:+4210-7748" style="color:rgb(141,141,141);text-decoration:none" target="_blank">tel.: 4210-7748</a> | <span style="text-align:initial;white-space:nowrap;display:inline-block"><a href="http://www.trinom.io/" style="color:rgb(141,141,141);text-decoration:none" target="_blank">www.trinom.io</a></span><span style="text-align:initial"> </span><span style="text-align:initial"> </span><span style="text-align:initial"> </span><span style="text-align:initial;color:rgb(69,102,142);display:inline-block"></span><span style="text-align:initial"> </span><span style="text-align:initial;display:inline-block">Av Calchaqui 4936· 2do Piso. Quilmes</span></div><div style="margin-top:5px"><a href="http://www.facebook.com/trinomiosrl" target="_blank"><img src="https://s3.amazonaws.com/images.wisestamp.com/icons_32/facebook.png" width="16" style="border-radius:0px;border:0px;width:16px"></a> <a href="https://www.linkedin.com/company/trinom-io" target="_blank"><img src="https://s3.amazonaws.com/images.wisestamp.com/icons_32/linkedin.png" width="16" alt="" style="border-radius:0px;border:0px;width:16px"></a></div><div><br></div></td></tr></tbody></table></div></div></div>
</div>
</div></div></blockquote></div><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>