[asterisk-dev] [Code Review] 2884: Performance: Remove dispatch object allocation from Stasis publishing
Mark Michelson
reviewboard at asterisk.org
Fri Sep 27 15:41:54 CDT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2884/#review9843
-----------------------------------------------------------
Ship it!
I would suggest adding a test case or two to test_taskprocessor.c for taskprocessor local info.
- Mark Michelson
On Sept. 26, 2013, 2:02 p.m., David Lee wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2884/
> -----------------------------------------------------------
>
> (Updated Sept. 26, 2013, 2:02 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> 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.
>
>
> Diffs
> -----
>
> /team/dlee/stasis-forward-optimization/res/res_security_log.c 399870
> /team/dlee/stasis-forward-optimization/res/res_pjsip_refer.c 399870
> /team/dlee/stasis-forward-optimization/res/res_pjsip_mwi.c 399870
> /team/dlee/stasis-forward-optimization/res/res_jabber.c 399870
> /team/dlee/stasis-forward-optimization/res/res_chan_stats.c 399870
> /team/dlee/stasis-forward-optimization/res/res_agi.c 399870
> /team/dlee/stasis-forward-optimization/res/parking/parking_manager.c 399870
> /team/dlee/stasis-forward-optimization/res/parking/parking_bridge_features.c 399870
> /team/dlee/stasis-forward-optimization/res/parking/parking_applications.c 399870
> /team/dlee/stasis-forward-optimization/main/taskprocessor.c 399870
> /team/dlee/stasis-forward-optimization/main/stasis_wait.c 399870
> /team/dlee/stasis-forward-optimization/main/stasis_message_router.c 399870
> /team/dlee/stasis-forward-optimization/main/stasis_cache.c 399870
> /team/dlee/stasis-forward-optimization/main/stasis.c 399870
> /team/dlee/stasis-forward-optimization/main/sounds_index.c 399870
> /team/dlee/stasis-forward-optimization/main/pbx.c 399870
> /team/dlee/stasis-forward-optimization/main/manager_mwi.c 399870
> /team/dlee/stasis-forward-optimization/main/manager_endpoints.c 399870
> /team/dlee/stasis-forward-optimization/main/manager_channels.c 399870
> /team/dlee/stasis-forward-optimization/main/manager_bridges.c 399870
> /team/dlee/stasis-forward-optimization/main/manager.c 399870
> /team/dlee/stasis-forward-optimization/main/endpoints.c 399870
> /team/dlee/stasis-forward-optimization/main/devicestate.c 399870
> /team/dlee/stasis-forward-optimization/main/cel.c 399870
> /team/dlee/stasis-forward-optimization/main/cdr.c 399870
> /team/dlee/stasis-forward-optimization/main/ccss.c 399870
> /team/dlee/stasis-forward-optimization/include/asterisk/taskprocessor.h 399870
> /team/dlee/stasis-forward-optimization/include/asterisk/stasis_internal.h 399870
> /team/dlee/stasis-forward-optimization/include/asterisk/stasis.h 399870
> /team/dlee/stasis-forward-optimization/funcs/func_presencestate.c 399870
> /team/dlee/stasis-forward-optimization/channels/sig_pri.c 399870
> /team/dlee/stasis-forward-optimization/channels/chan_skinny.c 399870
> /team/dlee/stasis-forward-optimization/channels/chan_sip.c 399870
> /team/dlee/stasis-forward-optimization/channels/chan_mgcp.c 399870
> /team/dlee/stasis-forward-optimization/channels/chan_iax2.c 399870
> /team/dlee/stasis-forward-optimization/channels/chan_dahdi.c 399870
> /team/dlee/stasis-forward-optimization/apps/confbridge/confbridge_manager.c 399870
> /team/dlee/stasis-forward-optimization/apps/app_voicemail.c 399870
> /team/dlee/stasis-forward-optimization/apps/app_queue.c 399870
> /team/dlee/stasis-forward-optimization/apps/app_meetme.c 399870
> /team/dlee/stasis-forward-optimization/res/res_stasis_test.c 399870
> /team/dlee/stasis-forward-optimization/res/res_xmpp.c 399870
> /team/dlee/stasis-forward-optimization/res/stasis/app.c 399870
> /team/dlee/stasis-forward-optimization/tests/test_devicestate.c 399870
> /team/dlee/stasis-forward-optimization/tests/test_stasis.c 399870
>
> Diff: https://reviewboard.asterisk.org/r/2884/diff/
>
>
> Testing
> -------
>
> Unit tests pass.
>
>
> Thanks,
>
> David Lee
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130927/dda105b9/attachment.html>
More information about the asterisk-dev
mailing list