<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1420659887078_6645">Hi Ed,</div><div id="yui_3_16_0_1_1420659887078_6646" dir="ltr">When you move the mouse on a canvas...</div><div id="yui_3_16_0_1_1420659887078_6231" dir="ltr">1) A tk mouse motion event calls a proc (I can't remember the rate at which they are sent, but run Pd with -d 3 and watch how many motion messages are sent over the socket as you mouse around)<br></div><div id="yui_3_16_0_1_1420659887078_8184" dir="ltr">2) The proc sends a message "[canvas you're mousing around in] motion blah blah blah" to the Pd process<br></div><div id="yui_3_16_0_1_1420659887078_6234" dir="ltr">3) Pd forwards the message to the canvas you're mousing around on, by calling the "motion" method<br></div><div id="yui_3_16_0_1_1420659887078_6647" dir="ltr">4) canvas_motion leads to canvas_doclick, which leads to this:</div><div dir="ltr" style="" class="" id="yui_3_16_0_1_1420659887078_6015"><span id="yui_3_16_0_1_1420659887078_6686" style="" class="">for (y = x->gl_list; y; y = y->g_next)</span></div><div id="yui_3_16_0_1_1420659887078_6687" dir="ltr" style="" class=""><br><span id="yui_3_16_0_1_1420659887078_6686" style="" class=""></span></div><div id="yui_3_16_0_1_1420659887078_6688" dir="ltr" style="" class=""><span id="yui_3_16_0_1_1420659887078_6686" style="" class="">So for each motion message, Pd searches through a linked list of objects on the canvas either until it finds one under the mouse or it runs out of objects.  If you only have a [bng] and a subpatch on the canvas, it probably is insignificant-- it's just comparing two saved bbox coordinates to the mouse position.  If you have your entire monster patch on a single canvas, just following all those pointers in the linked list is probably taking its toll on Pd's ability to compute a block of audio on schedule.</span></div><div id="yui_3_16_0_1_1420659887078_13452" dir="ltr" style="" class=""><br><span id="yui_3_16_0_1_1420659887078_6686" style="" class=""></span></div><div id="yui_3_16_0_1_1420659887078_13449" dir="ltr" style="" class=""><span id="yui_3_16_0_1_1420659887078_6686" style="" class="">-Jonathan<br></span></div><div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> On Wednesday, January 7, 2015 12:21 PM, Ed Kelly <morph_2016@yahoo.co.uk> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container"><div id="yiv6858715851"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px;"><font id="yiv6858715851yui_3_16_0_1_1420648456067_18380" size="2" face="Arial">On Wednesday, 7 January 2015, 11:55, Ed Kelly <morph_2016@yahoo.co.uk> wrote:<br clear="none"> </font> <div class="yiv6858715851qtdSeparateBR"><br clear="none"><br clear="none"></div><div class="yiv6858715851yahoo_quoted" id="yiv6858715851yui_3_16_0_1_1420648456067_18375" style="display:block;"><div id="yiv6858715851yui_3_16_0_1_1420648456067_18374" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px;"><div id="yiv6858715851yui_3_16_0_1_1420648456067_18373" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px;"> <blockquote id="yiv6858715851yui_3_16_0_1_1420648456067_18372" style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;margin-top:5px;padding-left:5px;">  <br clear="none"><br clear="none"> <div class="yiv6858715851y_msg_container" id="yiv6858715851yui_3_16_0_1_1420648456067_18371"><div class="yiv6858715851yqt7974051285" id="yiv6858715851yqt81836"><div id="yiv6858715851"><div id="yiv6858715851yui_3_16_0_1_1420648456067_18370"><div id="yiv6858715851yui_3_16_0_1_1420648456067_18369" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px;"><div dir="ltr" id="yiv6858715851yui_3_16_0_1_1420621716853_4003"><span id="yiv6858715851yui_3_16_0_1_1420648456067_18438">What about this...</span></div><div dir="ltr" id="yiv6858715851yui_3_16_0_1_1420621716853_4082"><br clear="none"><span></span></div><div dir="ltr" id="yiv6858715851yui_3_16_0_1_1420621716853_4084"><span id="yiv6858715851yui_3_16_0_1_1420621716853_4083">When I am editing a huge patch like the Ninja Jamm patch, where everything is on the same level (i.e. as few sub-patches as possible) moving the mouse over the patch causes a CPU spike, regardless of whether I change, move or connect anything or not.</span></div><div dir="ltr" id="yiv6858715851yui_3_16_0_1_1420621716853_4087"><br clear="none"><span></span></div><div dir="ltr" id="yiv6858715851yui_3_16_0_1_1420621716853_4086"><span id="yiv6858715851yui_3_16_0_1_1420621716853_4085">Could this be changed? I don't know all the guts of Pd, but if you could just move around the mouse pointer without</span></div><div dir="ltr" id="yiv6858715851yui_3_16_0_1_1420621716853_4089"><span id="yiv6858715851yui_3_16_0_1_1420621716853_4088">having to wait for 20 seconds or so before you can do anything, it would save a lot of time.<br clear="none"></span></div><div dir="ltr" id="yiv6858715851yui_3_16_0_1_1420621716853_4090"><br clear="none"><span></span></div><div dir="ltr" id="yiv6858715851yui_3_16_0_1_1420621716853_4092"><span id="yiv6858715851yui_3_16_0_1_1420621716853_4091">I think I heard once that any change to the patch means that Pd has to re-draw the entire graph. IMHO surely moving the mouse should not require this? I wait to be corrected!</span></div><div id="yiv6858715851yui_3_16_0_1_1420621716853_4004"><div id="yiv6858715851yui_3_16_0_1_1420648456067_18439"> </div><div dir="ltr" id="yiv6858715851yui_3_16_0_1_1420648456067_18460">x</div><div dir="ltr" id="yiv6858715851yui_3_16_0_1_1420648456067_18461">Ed<br clear="none"></div><div id="yiv6858715851yui_3_16_0_1_1420648456067_18462"><br clear="none"></div></div><div id="yiv6858715851yui_3_16_0_1_1420621716853_4006"><div id="yiv6858715851yui_3_16_0_1_1420621716853_4005">Ninja Jamm - a revolutionary new music remix app from Ninja Tune and Seeper, for iPhone and iPad<br clear="none">http://www.ninjajamm.com/</div><br clear="none"><br clear="none"><div id="yiv6858715851yui_3_16_0_1_1420621716853_4094">Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!<br clear="none">http://sharktracks.co.uk/ </div></div></div></div></div></div><br clear="none">_______________________________________________<br clear="none">Pd-dev mailing list<br clear="none"><a href="" class="removed-link" rel="nofollow" shape="rect" ymailto="mailto:Pd-dev@lists.iem.at" target="_blank">Pd-dev@lists.iem.at</a><br clear="none"><a href="" class="removed-link" rel="nofollow" shape="rect" target="_blank">http://lists.puredata.info/listinfo/pd-dev</a><br clear="none"><br clear="none"><br clear="none"></div> </blockquote>  </div> </div>   </div> </div></div></div><br><div class="yqt7974051285" id="yqt62172">_______________________________________________<br clear="none"><a href="" class="removed-link" shape="rect" ymailto="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">UNSUBSCRIBE and account-management -> <a href="" class="removed-link" shape="rect" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br clear="none"></div><br><br></div>  </div> </div>  </div> </div></body></html>