[asterisk-dev] [Code Review] Implement ast_channel_search_locked to expensive per-notify channel walk in chan_sip

Sean Bright sean.bright at gmail.com
Tue Nov 4 18:10:21 CST 2008


Brian Degenhardt wrote:
> I'm sorta partial to your way, above.  While it's slower, we don't have
> to worry about maintaining the separate data structure which has the
> potential to get out of sync.  Especially since this code only runs if
> you care about LINKEDID_END events.

Agreed.  Unfortunately this change doesn't mitigate the fact that in the worst
case you are doing a full scan of the list.  As you say, a hashtable would be
*much* faster for these types of key-based lookups, even with the expense of
maintaining a parallel data structure.

Thanks,
-- 
Sean Bright
sean.bright at gmail.com



More information about the asterisk-dev mailing list