[asterisk-bugs] [Asterisk 0017950]: iterate through all ao2_sip dialogs on every subscribe is slow, and not needed

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Oct 1 04:42:25 CDT 2010


The following issue has been RESOLVED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17950 
====================================================================== 
Reported By:                schmidts
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   17950
Category:                   Channels/chan_sip/Subscriptions
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     resolved
Target Version:             1.6.2.15
Asterisk Version:           SVN 
JIRA:                       SWP-2173 
Regression:                 No 
Reviewboard Link:           https://reviewboard.asterisk.org/r/901/ 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.2 
SVN Revision (number only!): 284848 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2010-09-03 07:10 CDT
Last Modified:              2010-10-01 04:42 CDT
====================================================================== 
Summary:                    iterate through all ao2_sip dialogs on every
subscribe is slow, and not needed
Description: 
on my time compares i have seen that the while loop in
handle_request_subscribe tooks even 2 ms on the first subscribe and this
counts up to at least 20ms with more than 1000 subscribes.
I´ve talked with Olle johansson and Klaus Darillion about this problem
and both said its not correct handling of a subscribe without a tag to
search for old subscribes from this peer for the exten and context. This
will cause old subscribes from the same peer to be present until the
expires and also the notifys will be send to this old subscribe too.

on a heave loaded system (> 1000 sip dialogs) this will make subscribe
handling even 20 times faster.
====================================================================== 

---------------------------------------------------------------------- 
 (0127581) svnbot (reporter) - 2010-10-01 04:42
 https://issues.asterisk.org/view.php?id=17950#c127581 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 289622

U   branches/1.4/channels/chan_sip.c
U   branches/1.6.2/channels/chan_sip.c
U   branches/1.8/channels/chan_sip.c

------------------------------------------------------------------------
r289622 | schmitds | 2010-10-01 04:42:23 -0500 (Fri, 01 Oct 2010) | 11
lines

don't iterate through all dialogs to find and delete old subscribes

On every incoming subscribe there is a iteration through all dialogs to
find old subscribes and delete them. This is slow and not RFC conform. This
was only needed in 1.2 cause a subscribe was not deleted when a dialog was
destroyed, after 1.4 a subscribe get removed when its dialog is destroyed.

(closes issue https://issues.asterisk.org/view.php?id=17950)
Reported by: schmidts
Tested by: schmidts

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


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=289622 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-10-01 04:42 svnbot         Checkin                                      
2010-10-01 04:42 svnbot         Note Added: 0127581                          
2010-10-01 04:42 svnbot         Status                   acknowledged =>
resolved
2010-10-01 04:42 svnbot         Resolution               open => fixed       
======================================================================




More information about the asterisk-bugs mailing list