<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">The second lazy-load option might work pretty well, but what would the per-instance/threading considerations be?<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 6, 2018, at 12:21 PM, Giulio Moro <<a href="mailto:giuliomoro@yahoo.it" class="">giuliomoro@yahoo.it</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">I don't think it makes sense to have a malloc() and free() for each call to a msg box.<br class="">Pd is already not very real-time friendly, why make it worse?<br class="">There could be ...<br class="">- statically allocated memory for t_gstack y in pd_pushsym<br class="">- a pre-allocated memory pool meant for short-lived memory allocations to be used in real-time critical cases like this. If no memory available from the pool, only then allocate it (or allocate a new pool).<br class="">There are probably other cases around the codebase where this would make sense, but why not starting with this?<br class=""><br class="">Giulio<br class=""><br class="">On Thursday, 5 April 2018, 22:54:44 BST, Jonathan Wilkes via Pd-list <<a href="mailto:pd-list@lists.iem.at" class="">pd-list@lists.iem.at</a>> wrote: <br class=""><br class=""><blockquote type="cite" class="">On Thursday, April 5, 2018, 3:20:03 PM EDT, Dan Wilcox <<a href="mailto:danomatika@gmail.com" class="">danomatika@gmail.com</a>> wrote: <br class=""></blockquote><br class=""><blockquote type="cite" class="">test? <a href="https://github.com/pure-data/pure-data/pull/346" class="">https://github.com/pure-data/pure-data/pull/346</a><br class=""></blockquote><br class="">That will add a malloc/free for every method call to a msg box. So <br class="">I'd measure the performance impact before using that <br class="">implementation.<br class=""><br class="">On the l2ork dev list I mentioned a potential way to cache the glist <br class="">in the t_messresponder to avoid allocation at message evaluation time. <br class="">But we haven't implemented that yet (nor measured the current <br class="">performance hit).<br class=""><br class="">-Jonathan<br class=""></div></div></blockquote></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">--------</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Dan Wilcox</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><a href="http://twitter.com/danomatika" class="">@danomatika</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><a href="http://danomatika.com" class="">danomatika.com</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><a href="http://robotcowboy.com" class="">robotcowboy.com</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""></body></html>