[Asterisk-code-review] stasis: Segment channel snapshot to reduce creation cost. (asterisk[master])
Joshua Colp
asteriskteam at digium.com
Tue Nov 13 07:29:06 CST 2018
Hello Jenkins2, Corey Farrell,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/10622
to look at the new patch set (#3).
Change subject: stasis: Segment channel snapshot to reduce creation cost.
......................................................................
stasis: Segment channel snapshot to reduce creation cost.
When a channel snapshot was created it used to be done
from scratch, copying all data (many strings). This incurs
a cost when doing so.
This change segments the channel snapshot into different
components which can be reused if unchanged from the
previous snapshot creation, reducing the cost. In normal
cases this results in some pointers being copied with
reference count being bumped, some integers being set,
and a string or two copied. The other benefit is that it
is now possible to determine if a channel snapshot update
is redundant and thus stop it before a message is published
to stasis.
The specific segments in the channel snapshot were split up
based on whether they are changed together, how often they
are changed, and their general grouping. In practice only
1 (or 0) of the segments actually get changed in normal
operation.
Invalidation is done by setting a flag on the channel when
the segment source is changed, forcing creation of a new
segment when the channel snapshot is created.
ASTERISK-28119
Change-Id: I5d7ef3df963a88ac47bc187d73c5225c315f8423
---
M apps/app_queue.c
M channels/chan_pjsip.c
M channels/pjsip/cli_commands.c
M configs/samples/ari.conf.sample
M configs/samples/manager.conf.sample
M include/asterisk/channel.h
M include/asterisk/stasis_channels.h
M main/bridge.c
M main/cdr.c
M main/cel.c
M main/channel.c
M main/channel_internal_api.c
M main/cli.c
M main/core_local.c
M main/endpoints.c
M main/manager.c
M main/manager_bridges.c
M main/manager_channels.c
M main/stasis_bridges.c
M main/stasis_channels.c
M pbx/pbx_realtime.c
M res/ari/resource_bridges.c
M res/ari/resource_channels.c
M res/parking/parking_applications.c
M res/parking/parking_bridge_features.c
M res/res_pjsip/pjsip_configuration.c
M res/res_pjsip_refer.c
M res/res_stasis.c
M res/stasis/app.c
M tests/test_cel.c
M tests/test_stasis_channels.c
31 files changed, 878 insertions(+), 469 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/22/10622/3
--
To view, visit https://gerrit.asterisk.org/10622
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5d7ef3df963a88ac47bc187d73c5225c315f8423
Gerrit-Change-Number: 10622
Gerrit-PatchSet: 3
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181113/304db339/attachment.html>
More information about the asterisk-code-review
mailing list