[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Partysip-dev] Hashing for finding transactions

From: Aymeric Moizard
Subject: Re: [Partysip-dev] Hashing for finding transactions
Date: Sat, 29 Jan 2005 00:25:34 +0100 (CET)

On Fri, 28 Jan 2005, Mikael Hakman wrote:


Finally some mails in this not crowdy mailing list...

On Friday, January 28, 2005 12:58 PM, Rohit Mutsuddi wrtote:

I've been using the partysip proxy for some time now. I feel the osip_transaction_find can be made more efficient by implementing a hash instead of going through the lists in order to match the transaction.

That would be a great patch.

Has anyone implemented such a hash for this yet and what are your thoughts on this. Will this ensure improved performance or are there other overheads that might come in.

I do not know much about osip but generally hash table lookup will be more efficient than sequential lookup when there are enough entries to search. The exact break-even will depend on chosen hash function, width of hash, and size of hash table. The next question could be how many percent of time does osip spend in searching for transactions as compared to other processing. If it uses 1% for searching sequentially and 99% for other tasks then there wouldn't be any significant gain however efficient you could make the search.

I would say that with hundreds or more of transactions to search there should be a reason to look closer at the problem. With 10 transactions I wouldn't bother.

I think that parsing messages use probably more CPU than searching accross transactions. (anybody ready for measurements?) In this case there would be a small gain but still I would find the patch very usefull!

Just for note:
On way to improve performance would be to enlarge the timers value
in osip. (this can be done only at compilation time by replacing
some defines)

Can you tell us the average number of transaction/minutes?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]