<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/2884/">https://reviewboard.asterisk.org/r/2884/</a>
</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 David Lee.</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;">While looking for areas for performance improvement, I realized that an
unused feature in Stasis was negatively impacting performance.
When a message is sent to a subscriber, a dispatch object is allocated
for the dispatch, containing the topic the message was published to, the
subscriber the message is being sent to, and the message itself.
The topic is actually unused by any subscriber in Asterisk today. And
the subscriber is associated with the taskprocessor the message is being
dispatched to.
First, this patch removes the unused topic parameter from Stasis
subscription callbacks.
Second, this patch introduces the concept of taskprocessor local data,
data that may be set on a taskprocessor and provided along with the data
pointer when a task is pushed using the ast_taskprocessor_push_local()
call. This allows the task to have both data specific to that
taskprocessor, in addition to data specific to that invocation.
With those two changes, the dispatch object can be removed completely,
and the message is simply refcounted and sent directly to the
taskprocessor.</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;">Unit tests pass.</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/dlee/stasis-forward-optimization/res/res_security_log.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/res/res_pjsip_refer.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/res/res_pjsip_mwi.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/res/res_jabber.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/res/res_chan_stats.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/res/res_agi.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/res/parking/parking_manager.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/res/parking/parking_bridge_features.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/res/parking/parking_applications.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/taskprocessor.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/stasis_wait.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/stasis_message_router.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/stasis_cache.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/stasis.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/sounds_index.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/pbx.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/manager_mwi.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/manager_endpoints.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/manager_channels.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/manager_bridges.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/manager.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/endpoints.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/devicestate.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/cel.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/cdr.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/main/ccss.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/include/asterisk/taskprocessor.h <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/include/asterisk/stasis_internal.h <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/include/asterisk/stasis.h <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/funcs/func_presencestate.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/channels/sig_pri.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/channels/chan_skinny.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/channels/chan_sip.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/channels/chan_mgcp.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/channels/chan_iax2.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/channels/chan_dahdi.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/apps/confbridge/confbridge_manager.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/apps/app_voicemail.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/apps/app_queue.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/apps/app_meetme.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/res/res_stasis_test.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/res/res_xmpp.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/res/stasis/app.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/tests/test_devicestate.c <span style="color: grey">(399870)</span></li>
<li>/team/dlee/stasis-forward-optimization/tests/test_stasis.c <span style="color: grey">(399870)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2884/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>