]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Remove dispatch object allocation from Stasis publishing
authorDavid M. Lee <dlee@digium.com>
Mon, 30 Sep 2013 18:48:57 +0000 (18:48 +0000)
committerDavid M. Lee <dlee@digium.com>
Mon, 30 Sep 2013 18:48:57 +0000 (18:48 +0000)
commit516dbe86a0be8fb3d97f441560df39a8cb5f9a26
tree0e35d2b88a07a680d89c0660f187195e86b860ef
parent9d21631aeeade117fda1a2feddbbb13b4dbcca69
Remove dispatch object allocation from Stasis publishing

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.

Review: https://reviewboard.asterisk.org/r/2884/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
46 files changed:
apps/app_meetme.c
apps/app_queue.c
apps/app_voicemail.c
apps/confbridge/confbridge_manager.c
channels/chan_dahdi.c
channels/chan_iax2.c
channels/chan_mgcp.c
channels/chan_sip.c
channels/chan_skinny.c
channels/sig_pri.c
funcs/func_presencestate.c
include/asterisk/stasis.h
include/asterisk/stasis_internal.h
include/asterisk/taskprocessor.h
main/ccss.c
main/cdr.c
main/cel.c
main/devicestate.c
main/endpoints.c
main/manager.c
main/manager_bridges.c
main/manager_channels.c
main/manager_endpoints.c
main/manager_mwi.c
main/pbx.c
main/sounds_index.c
main/stasis.c
main/stasis_cache.c
main/stasis_message_router.c
main/stasis_wait.c
main/taskprocessor.c
res/parking/parking_applications.c
res/parking/parking_bridge_features.c
res/parking/parking_manager.c
res/res_agi.c
res/res_chan_stats.c
res/res_jabber.c
res/res_pjsip_mwi.c
res/res_pjsip_refer.c
res/res_security_log.c
res/res_stasis_test.c
res/res_xmpp.c
res/stasis/app.c
tests/test_devicestate.c
tests/test_stasis.c
tests/test_taskprocessor.c