mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-04 03:20:33 +00:00
Stasis performance improvements
This patch addresses several performance problems that were found in the initial performance testing of Asterisk 12. The Stasis dispatch object was allocated as an AO2 object, even though it has a very confined lifecycle. This was replaced with a straight ast_malloc(). The Stasis message router was spending an inordinate amount of time searching hash tables. In this case, most of our routers had 6 or fewer routes in them to begin with. This was replaced with an array that's searched linearly for the route. We more heavily rely on AO2 objects in Asterisk 12, and the memset() in ao2_ref() actually became noticeable on the profile. This was #ifdef'ed to only run when AO2_DEBUG was enabled. After being misled by an erroneous comment in taskprocessor.c during profiling, the wrong comment was removed. Review: https://reviewboard.asterisk.org/r/2873/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -431,10 +431,6 @@ static void tps_taskprocessor_destroy(void *tps)
|
||||
}
|
||||
ast_free((char *) t->name);
|
||||
if (t->listener) {
|
||||
/* This code should not be reached since the listener
|
||||
* should have been destroyed before the taskprocessor could
|
||||
* be destroyed
|
||||
*/
|
||||
ao2_ref(t->listener, -1);
|
||||
t->listener = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user