Guy Harris wrote:
What about a display attribute in the tree structure, with it we might
'if enclosed' a lot of expensive sprintf calls.
The sprintf calls in "proto_tree_add" and "proto_item_append" routines
are already made only if we're constructing a "visible" protocol tree;
see the checks for "fi->visible" in "epan/proto.c" (and hidden items
*never* have that constructed). "Visible" protocol trees are
constructed only by "print_packets()", "match_protocol_tree()",
"select_packet()", and "wtap_dispatch_cb_write()" in Tethereal *if* the
"-V" flag was specified; the tree constructed when reading the file and
when filtering isn't "visible".
Ok, I was thinking about all calls to proto_tree_add_text in dissectors.
cf attached patch for ip.
_______________________________________________
Ethereal-dev mailing list
[EMAIL PROTECTED]
http://www.ethereal.com/mailman/listinfo/ethereal-dev
packet-ip.patch.gz
Description: Unix tar archive