<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt">I'm just having trouble with the specifics. Do you have an example of a patch that suffers from Pd's current single-threaded implementation that would be measurably improved by using a multi-threaded approach? Also, what is the metric to use here?<br><br>To compare apples to apples, imagine that every g_* sourcefile has already been moved to the GUI side of both the single- and double- threaded designs that are being compared.<br><div><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>-Jonathan<br></span></div><div style="display: block;" class="yahoo_quoted"> <br> <br> <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" size="2"> On Sunday, February 23, 2014 12:30 AM, Rich E <reakinator@gmail.com> wrote:<br> </font> </div> <div class="y_msg_container"><div id="yiv7289046929"><div><div dir="ltr"><br clear="none"><div class="yiv7289046929gmail_extra"><br clear="none"><br clear="none"><div class="yiv7289046929yqt6292793896" id="yiv7289046929yqtfd10185"><div class="yiv7289046929gmail_quote">On Fri, Feb 21, 2014 at 3:54 AM, Jonathan Wilkes <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:jancsika@yahoo.com" target="_blank" href="mailto:jancsika@yahoo.com">jancsika@yahoo.com</a>></span> wrote:<br clear="none">
<blockquote class="yiv7289046929gmail_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 class="yiv7289046929">
<div>On 02/20/2014 09:50 PM, Rich E wrote:<br clear="none">
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="yiv7289046929gmail_extra"><br clear="none">
<br clear="none">
<div class="yiv7289046929gmail_quote">On Wed, Feb 19, 2014 at 12:07 AM,
Jonathan Wilkes <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:jancsika@yahoo.com" target="_blank" href="mailto:jancsika@yahoo.com">jancsika@yahoo.com</a>></span> wrote:<br clear="none">
<blockquote class="yiv7289046929gmail_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>
<div>On 02/18/2014 11:11 PM, Rich E wrote:<br clear="none">
</div>
<blockquote type="cite">
<div dir="ltr"><br clear="none">
<div class="yiv7289046929gmail_extra"><br clear="none">
<br clear="none">
<div class="yiv7289046929gmail_quote">On Mon, Jan 13, 2014
at 5:35 PM, Dan Wilcox <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:danomatika@gmail.com" target="_blank" href="mailto:danomatika@gmail.com">danomatika@gmail.com</a>></span>
wrote:<br clear="none">
<blockquote class="yiv7289046929gmail_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 style="word-wrap:break-word;">Ah wait,
duh. Of course the graph needs to know
positioning, that's how it determines
execution order or independent blocks of
objects right?
<div>
<div><br clear="none">
<div>
<div>On Jan 13, 2014, at 5:14 PM,
Dan Wilcox <<a rel="nofollow" shape="rect" ymailto="mailto:danomatika@gmail.com" target="_blank" href="mailto:danomatika@gmail.com">danomatika@gmail.com</a>>
wrote:</div>
<br clear="none">
<blockquote type="cite"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important;">Does
the dsp graph rely on
positioning? I thought only
via connections. I'd imagine
the gui wrapper should only
worry about positioning and
simply update those changes
when saving.</span></blockquote>
</div>
<br clear="none">
</div>
</div>
</div>
</blockquote>
<div><br clear="none">
</div>
<div><br clear="none">
</div>
<div>IMO a separation between GUI and core
could/would include position, e.g. objects
have their connections mapped by an index,
GUI assigns the index to the object based
on position. This would allow for some
much more sophisticated GUI's, such as 3d,
or even a more human-readable text version
(json has been mentioned).</div>
</div>
</div>
</div>
</blockquote>
<br clear="none">
</div>
</div>
You run into problems when you want to get decent GUI
interaction _and_ expect to deliver audio to the
soundcard in realtime.<br clear="none">
<br clear="none">
</div>
</blockquote>
<div><br clear="none">
</div>
<div>The GUI and audio shouldn't be updated from the same
thread. This is one nice thing about libpd, it forces a
separation.</div>
</div>
</div>
</div>
</blockquote>
<br clear="none"></div>
What are the drawbacks to the multi-threaded approach?
Specifically, for a full-fledged editing environment where you can't
easily predict what the userbase is going to come up with inside the
GUI?<div class="yiv7289046929"><br clear="none">
<br clear="none"></div></div></blockquote><div><br clear="none"></div><div>Firstly, I think the decision should at least be available (to process audio and GUI on separate threads), since this is the most common way to handle the two different update rates. Especially since, with most GUI frameworks, you _must_ update the GUI on the main / UI thread, which is running at 60fps.</div>
<div><br clear="none"></div><div>But to answer the question... drawback is having to manage the whole 'this method must to be called on the audio thread, and that method must be called on the non-audio thread'. However this turns out to be little of a limitation since it is almost always what you want to do anyway, and you gain huge amounts in the area of responsiveness.</div>
<div><br clear="none"></div><div><div>In the end, every situation is different. With pd vanilla, audio is most important and maybe that deserves the current architecture. To me, it is more about keeping options open, which is why I think abstracting the visual position from the core is a good idea.</div>
</div><div><br clear="none"></div></div></div></div></div></div></div><br><br></div> </div> </div> </div> </div></body></html>