<div dir="ltr">as soon as a pointer moves within an object the object should be notified that the mouse is within it , no other objects should then be concerned nor be in any poll loop<br></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Fri, Jun 27, 2014 at 11:08 AM, Jonathan Wilkes <span dir="ltr"><<a href="mailto:jancsika@yahoo.com" target="_blank">jancsika@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt"><div><span>tcl/tk is just doing what it's told, which is to send mouse movement notifications over the socket to Pd.</span></div>
<div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br><span></span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
<span>For each mouse motion message Pd receives from the GUI, it does a full loop over all the objects in the canvas to find out who was clicked.  In edit mode, it can
 do up to two full loops if you did a "select all".  (See canvas_findhitbox in g_editor.c)</span><span>.  I'm assuming those are the most labor intensive parts of moving the mouse in Pd, but I haven't actually done any profiling.</span></div>
<div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br><span></span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
<span>Additionally, each iteration of the loop calls a getrectfn for the object being inspected.  Typically that function just spits back the last values stored for the object's bbox.  But if a single GUI external happens
 to do something oddly inefficient in that function, it is doing it every mouse motion message.</span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
<br><span></span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><span>If these calculations + dsp graph calculation don't finish in the time it takes to compute a block, you'll get a dropout.  And of course if you got a dropout, and you continue moving the mouse, you'll probably continue getting dropouts.</span></div>
<div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br><span></span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
<span>On the other hand, tk will put off redrawing the canvas until it has free time to do so.  Thus redrawing may come regularly, sporadically, or in some unfortunate cases with Pd -rt, never.  The fact that tk happily stops drawing at all when the core Pd process has realtime scheduling should tell you that tk is usually not the culprit in dropouts.</span></div>
<br>It's unclear what the solution should be.  If one removed all the widgetbehavior from "core" and put it in a separate "gui" process, then the patch author no longer has easy access to the visual diagram data.  (Easy
 as in deterministic behavior when querying object positions or bboxes in a chain of objects that compute in zero logical time.)  On the other hand, I think the GUI could just send a message telling Pd which object was actually clicked.  (But keep all the getrect and hitbox functionality around so that if the user needs to fetch that data programmatically they can do so.)<span class="HOEnZb"><font color="#888888"><br>
<br>-Jonathan</font></span><div><div class="h5"><br><div><br><br></div><div style="display:block"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt">
 <div dir="ltr"> <font face="Arial"> On Friday, June 27, 2014 5:50 AM, Billy Stiltner via Pd-list <<a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a>> wrote:<br> </font> </div>  <br><br> <div>
<div><div><div dir="ltr">i think it has something to do with tcl and the mouse<br clear="none"><br clear="none"></div><div><div><br clear="none"><br clear="none"><div>On Thu, Jun 19, 2014 at 5:55 PM, Simon Iten via Pd-list <span dir="ltr"><<a rel="nofollow" shape="rect" href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a>></span> wrote:<br clear="none">

<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">i was Not clear i guess. I mean it never worked properly. A lot of dropouts and lock ups.<br clear="none">
<div><div><br clear="none">
<br clear="none">
_______________________________________________<br clear="none">
<a rel="nofollow" shape="rect" href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br clear="none">
UNSUBSCRIBE and account-management -> <a rel="nofollow" shape="rect" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br clear="none">
</div></div></blockquote></div><br clear="none"></div></div></div></div><br><div>_______________________________________________<br clear="none"><a shape="rect" href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br clear="none">
UNSUBSCRIBE and account-management -> <a shape="rect" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br clear="none"></div><br><br></div>  </div> </div>
  </div> </div></div></div></div></blockquote></div><br></div>