Ethereal-cvs: [Ethereal-cvs] rev 13007: /trunk/epan/: proto.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Wed, 12 Jan 2005 21:31:32 -0000
User: ulfl
Date: 2005/01/12 03:31 PM

Log:
 performance improvement: 
 In the past: to prevent duplicate protocol names (and alike), each time a new protocol was registered, the list of protocols were iterated and the name compared with each existing name using strcasecmp, which is slow as we have >500 protocols right now.
 
 Now: the protocol name to check against duplicates is first converted into a hashvalue and then only this value is checked and stored in a hashtable. This way the string to check for, has to be converted/compared only a single time!

Directory: /trunk/epan/
  Changes    Path          Action
  +68 -44    proto.c       Modified



http://anonsvn.ethereal.com/viewcvs/viewcvs.py?rev=13007&view=rev