[Asterisk-code-review] cdr.c: Eliminated many calls to ao2 global obj ref(). (asterisk[14])

Richard Mudgett asteriskteam at digium.com
Thu Oct 12 19:13:12 CDT 2017


Hello Jenkins2, Corey Farrell, 

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

    https://gerrit.asterisk.org/6773

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

Change subject: cdr.c: Eliminated many calls to ao2_global_obj_ref().
......................................................................

cdr.c: Eliminated many calls to ao2_global_obj_ref().

The CDR performance gets worse the further it gets behind in processing
stasis messages.  One of the reasons is we were getting the global config
to determine if we needed to log a debugging message.

* Many calls to ao2_global_obj_ref() were just so we could determine if
debug mode is enabled.  Made a global flag to check instead.

* Eliminated many RAII_VAR() usages associated with the remaining
ao2_global_obj_ref() calls.

* Added missing NULL checks for the returned ao2_global_obj_ref() value.

ASTERISK-27335

Change-Id: Iceaad93172862f610cad0188956634187bfcc7cd
---
M main/cdr.c
1 file changed, 185 insertions(+), 124 deletions(-)


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

Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iceaad93172862f610cad0188956634187bfcc7cd
Gerrit-Change-Number: 6773
Gerrit-PatchSet: 2
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171012/bad52aaf/attachment.html>


More information about the asterisk-code-review mailing list