[Asterisk-Dev] IAX friend building perf

Kevin P. Fleming kpfleming at starnetworks.us
Tue Mar 15 13:29:57 MST 2005


Michael Giagnocavo wrote:
> Hashtables are the answer? That's the "correct" way to avoid this silly
> O(N*N) thing. But, talking in #asterisk, someone made it quite clear that
> hashtables were not going to be allowed in because someone "likes linked
> lists".

That depends on what part of the code you are talking about.

Using hashtables for storage of peers/users/friends/channels/etc. is on 
its way.

Using hashtables for storage of config file contents so that they can be 
parsed is not likely to happen, for the simple reason that Asterisk 
config files allow the same variable to be specified more than one time, 
and the order of appearance _must_ be preserved. Hashtables cannot do that.

However, I do have some other stuff in the works that will help this 
problem to some degree, but it's quite a ways to go before it will 
usable and even ready to be posted.



More information about the asterisk-dev mailing list