Wireshark-commits: [Wireshark-commits] rev 42141: /trunk/epan/ /trunk/epan/: conversation.c convers
Date: Thu, 19 Apr 2012 13:59:14 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=42141

User: etxrab
Date: 2012/04/19 06:59 AM

Log:
 From Cristian Constantin:
 while caching the last element from the conversation hash chain lists speeds-up
 the operation when the hash/chain lists are actually built, it 
 does NOT help a lot when a certain random conversation which is in the hash
 table is looked-up.
 
 I did some profiling and tracing and I saw that a lot of cpu time is spent in
 the function conversation_lookup_hashtable() when wireshark
 is asked to show the "Flow Graph", "TCP Conversations", "Voip Calls".  I used
 two types of captures with over 500k packets:
 
 - tcp packets having the _same_ src ip addr, src tcp port, dst ip addr, dst tcp 
   port
 - (mostly) sip packets containing sdp payloads which advertise the _same_ ip
   addr, udp port for media
 
 these types of captures lead to _huge_ chain lists behind the same hash bucket 
 (to which the conversation is actually mapped)
 
 the solution would be to cache the last found conversation into the head of the 
 chain list and to use it whenever it is possible; most of the time the look-up
 will be in O(1) instead of O(n) (n - number
 of elements in the list).
 
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7149

Directory: /trunk/epan/
  Changes    Path              Action
  +6 -1      conversation.c    Modified
  +2 -0      conversation.h    Modified