[Asterisk-code-review] res pjsip: Cache global config options. (asterisk[14])

Richard Mudgett asteriskteam at digium.com
Thu Aug 25 18:15:58 CDT 2016


Hello Mark Michelson, George Joseph, Anonymous Coward #1000019,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/3480

to look at the new patch set (#2).

Change subject: res_pjsip: Cache global config options.
......................................................................

res_pjsip: Cache global config options.

We may check a global config option hundreds of times a second or more.
Asking sorcery for the global configuration from the config files backend
involves several allocations and container traversals.  Using realtime
without a memory cache is a lot worse because you have to lookup in the
realtime database each time to reconstitute the sorcery object.  With a
memory cache for realtime, there is about the same amount of overhead as
for config files.  Either way, it is still fairly expensive to access the
sorcery object that much.

* Cache the global config options so we can access them faster.  You must
now always perform a res_pjsip reload to change the global options.

Change-Id: Ice16c7a4cbca4614da344aaea21a072b86263ef7
---
M CHANGES
M res/res_pjsip/config_global.c
2 files changed, 20 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/80/3480/2
-- 
To view, visit https://gerrit.asterisk.org/3480
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ice16c7a4cbca4614da344aaea21a072b86263ef7
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list