<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://reviewboard.asterisk.org/r/2890/">https://reviewboard.asterisk.org/r/2890/</a>
     </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ship It!</pre>
 <br />









<p>- David</p>


<br />
<p>On September 27th, 2013, 12:32 p.m. CDT, Mark Michelson wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers, David Lee and Joshua Colp.</div>
<div>By Mark Michelson.</div>


<p style="color: grey;"><i>Updated Sept. 27, 2013, 12:32 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">A performance issue seen when doing a mid to high call-per-second test with chan_pjsip was that the device state callback was creating many stasis subscriptions, which in turn meant the creation of many taskprocessors, which in turn meant the creation of many threads.

Due to a change in when the stasis cache is updated (the publisher thread now updates the cache), the temporary subscriptions should no longer be required. The change presented here gets rid of the "guaranteed" parameter for ast_endpoint_latest_snapshot(). It also gets rid of the stasis_topic_wait() call in chan_pjsip.c since it should not be needed.

It may be possible to get rid of stasis_topic_wait() altogether, but I'm not so sure about that.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ran a 25 cps test that simply answered and hung up. These changes introduced about a 1% CPU performance gain on my system.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/team/group/performance/channels/chan_pjsip.c <span style="color: grey">(399935)</span></li>

 <li>/team/group/performance/include/asterisk/stasis_endpoints.h <span style="color: grey">(399935)</span></li>

 <li>/team/group/performance/main/stasis_endpoints.c <span style="color: grey">(399935)</span></li>

 <li>/team/group/performance/res/ari/resource_endpoints.c <span style="color: grey">(399935)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/2890/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>