[asterisk-bugs] [Asterisk 0014738]: Address device state performance issues in 1.6.1
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Mar 25 17:07:08 CDT 2009
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=14738
======================================================================
Reported By: russell
Assigned To: russell
======================================================================
Project: Asterisk
Issue ID: 14738
Category: Core/General
Reproducibility: always
Severity: major
Priority: normal
Status: closed
Target Version: 1.6.1.0
Asterisk Version: 1.6.1.0-rc3
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2009-03-24 13:39 CDT
Last Modified: 2009-03-25 17:07 CDT
======================================================================
Summary: Address device state performance issues in 1.6.1
Description:
http://reviewboard.digium.com/r/205/
======================================================================
----------------------------------------------------------------------
(0102193) svnbot (reporter) - 2009-03-25 17:07
http://bugs.digium.com/view.php?id=14738#c102193
----------------------------------------------------------------------
Repository: asterisk
Revision: 184343
_U branches/1.6.2/
U branches/1.6.2/apps/app_minivm.c
U branches/1.6.2/apps/app_voicemail.c
U branches/1.6.2/channels/chan_dahdi.c
U branches/1.6.2/channels/chan_iax2.c
U branches/1.6.2/channels/chan_mgcp.c
U branches/1.6.2/channels/chan_sip.c
U branches/1.6.2/channels/chan_unistim.c
U branches/1.6.2/include/asterisk/_private.h
U branches/1.6.2/include/asterisk/devicestate.h
U branches/1.6.2/include/asterisk/event.h
U branches/1.6.2/include/asterisk/strings.h
U branches/1.6.2/main/asterisk.c
U branches/1.6.2/main/devicestate.c
U branches/1.6.2/main/event.c
U branches/1.6.2/res/ais/evt.c
------------------------------------------------------------------------
r184343 | russell | 2009-03-25 17:07:08 -0500 (Wed, 25 Mar 2009) | 43
lines
Merged revisions 184339 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r184339 | russell | 2009-03-25 16:57:19 -0500 (Wed, 25 Mar 2009) | 35
lines
Improve performance of the ast_event cache functionality.
This code comes from svn/asterisk/team/russell/event_performance/.
Here is a summary of the changes that have been made, in order of both
invasiveness and performance impact, from smallest to largest.
1) Asterisk 1.6.1 introduces some additional logic to be able to handle
distributed device state. This functionality comes at a cost.
One relatively minor change in this patch is that the extra processing
required for distributed device state is now completely bypassed if
it's not needed.
2) One of the things that I noticed when profiling this code was that a
_lot_ of time was spent doing string comparisons. I changed the way
strings are represented in an event to include a hash value at the
front.
So, before doing a string comparison, we do an integer comparison on
the
hash.
3) Finally, the code that handles the event cache has been re-written.
I tried to do this in a such a way that it had minimal impact on the
API.
I did have to change one API call, though -
ast_event_queue_and_cache().
However, the way it works now is nicer, IMO. Each type of event that
can be cached (MWI, device state) has its own hash table and rules for
hashing and comparing objects. This by far made the biggest impact on
performance.
For additional details regarding this code and how it was tested, please
see the
review request.
(closes issue http://bugs.digium.com/view.php?id=14738)
Reported by: russell
Review: http://reviewboard.digium.com/r/205/
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=184343
Issue History
Date Modified Username Field Change
======================================================================
2009-03-25 17:07 svnbot Checkin
2009-03-25 17:07 svnbot Note Added: 0102193
======================================================================
More information about the asterisk-bugs
mailing list