[Asterisk-Dev] Profiling results: Asterisk processing 5000 concurrent IAX registrations

Steve Kann stevek at stevek.com
Mon Oct 31 07:27:00 MST 2005


Kevin P. Fleming wrote:

> steve at daviesfam.org wrote:
>
>> In this example, looks like we'd probably score significantly by
>> down/upshifting peer names or whatever and then using a standard 
>> str(n)cmp rather than strcasecmp.
>
>
> There are actually many places in Asterisk where that sort of thing 
> will be beneficial, and I've done quite a bit of work in that area for 
> post-1.2 merging... the same is true in the dialplan, only there the 
> problem is even worse due to the multiple searches that happen for 
> each step.


Would it make a big difference to just use strcmp instead of strcasecmp? 
My guess is that it would improve things by at most 25% or so, but 
probably less (like 10%).  That's just my gut, though..

Obviously, you need to move from a linear search over all the peers 
O(n), which is does n times (so the whole registration system is 
O(n^2)), to some kind of indexed search..

-SteveK






More information about the asterisk-dev mailing list