<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/2461/">https://reviewboard.asterisk.org/r/2461/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray solid;">
<tr>
<td>
<h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been marked as submitted.</h1>
</td>
</tr>
</table>
<br />
<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.</div>
<div>By rmudgett.</div>
<p style="color: grey;"><i>Updated April 22, 2013, 12:35 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Committed in revision 386303</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-21058">ASTERISK-21058</a>
</div>
<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;">Local channel optimization is needed to reduce system resources and frame delay through Asterisk. This patch gets local channel optimization working again using the new bridging model.
The primary method of optimization is to merge bridges together. The optimizing local channels continuously check for empty queues in the local;1 and local;2 channels. Once it is found that the queues are empty and the bridges allow merging, either BridgeA or BridgeB is merged into the other bridge.
A future additional way to optimize out local channels in more circumstances is to swap the Local;2 channel in BridgeB with the only peer channel (A) in BridgeA. This optimization strategy would be needed if BridgeB prohibits bridge merges.
A -- BridgeA -- Local;1-Local;2 -- BridgeB -- B
</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;">* Checked that local channels can optimize themselves out in the normal situation as shown in the description.
* Checked that the local channels can optimize themselves out in the situation where there is a chain of 300 local channel pairs. This seems to work faster than it used to, but that was not quantified.
* Checked that local channels could not optimize themselves out when the local;2 is running an application instead of being in another bridge.</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/bridge_construction/bridges/bridge_builtin_features.c <span style="color: grey">(386151)</span></li>
<li>/team/group/bridge_construction/channels/chan_local.c <span style="color: grey">(386151)</span></li>
<li>/team/group/bridge_construction/include/asterisk/bridging.h <span style="color: grey">(386151)</span></li>
<li>/team/group/bridge_construction/main/bridging.c <span style="color: grey">(386151)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2461/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>