Hi,
attached patch contains small TPKT performance improvement.
The find_protocol_by_id() was called for each packet and it took some time
as this function performs linear serching in the protocols GList.
Regards,
Tom
Before patch:
Func Func+Child Hit
Time % Time % Count Function
---------------------------------------------------------
8642,524 6,1 8642,524 6,1 7720576 _compare_proto_id (proto.obj)
7941,234 5,6 17585,988 12,4 2172863 _alloc_field_info (proto.obj)
7286,696 5,1 18664,819 13,1 20643 _g_list_find_custom (libglib-2.0-0.dll)
6588,995 4,6 37316,586 26,3 2051205 _proto_tree_add_pi (proto.obj)
5170,614 3,6 9094,229 6,4 2172863 _proto_tree_add_node (proto.obj)
4873,829 3,4 7710,847 5,4 2513140 _g_hash_table_lookup (libglib-2.0-0.dll)
After patch:
Func Func+Child Hit
Time % Time % Count Function
---------------------------------------------------------
3668,139 6,1 8277,880 13,8 1394943 _alloc_field_info (proto.obj)
2916,684 4,9 17027,568 28,5 1315616 _proto_tree_add_pi (proto.obj)
2455,281 4,1 4232,882 7,1 1394943 _proto_tree_add_node (proto.obj)
2073,222 3,5 3087,354 5,2 1613109 _g_hash_table_lookup (libglib-2.0-0.dll)
1777,042 3,0 29750,947 49,8 22899 _dissect_ip (packet-ip.obj)
1704,968 2,9 2575,010 4,3 1395165 _fvalue_new (ftypes.obj)
--
_________________________________________________
ANF DATA ANF DATA spol. s r. o.
a SIEMENS Company M-palác, Heršpická 5
639 00 Brno
Czech Republic
Tomáš Kukosa Tel.: +420 - 5 4310 6822
PSE ECT AES 6 Fax: +420 - 5 4324 8780
Room: 8.24 mailto:tomas.kukosa@xxxxxxxxxxx
_________________________________________________
Attachment:
packet-tpkt.c.diff.gz
Description: GNU Zip compressed data