Ethereal-dev: Re: [Ethereal-dev] compare_proto_id taking up 20% of Ethereal's time

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

From: Richard Sharpe <rsharpe@xxxxxxxxxxxxxxxxx>
Date: Sat, 15 Nov 2003 16:10:04 -0800 (PST)
OK, 

more info.

compare_proto_id is called from g_list_find_custom becuase it is passed as 
a parameter, and g_list_find_custom is called from find_protocol_by_id.

Form the data I posted, find_protocol_by_id is called 668,116 times, but 
we don't actually get the number of calls, perhaps because it is being 
called from glib and I do not have that built with -pg.

However, here are the places that find_protocol_by_id are called from:

0.00    0.00       5/668116      proto_set_cant_disable [356]
0.00    0.00      92/668116      proto_get_protocol_filter_name [323]
0.00    0.00     389/668116      proto_register_field_array [306]
0.03    0.00  235988/668116      proto_is_protocol_enabled [111]
0.05    0.00  431642/668116      proto_get_protocol_short_name [69]

So, the two biggest contributors are proto_is_protocol_enabled and 
proto_get_protocol_short_name.

However, I would still like to rebuild Ethereal with glib compiled with 
-pg so we can see if it really is a problem.
 
Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com