On Thu, Aug 26, 1999 at 12:39:31AM -0500, Guy Harris wrote:
>
> We might want to somehow let the routines that add stuff to the protocol
> tree (the actual "proto_tree_xxx" routines) know whether we plan to
> *display* anything from the protocol tree or not and, if not, have them
> not bother generating any text, as the filter code doesn't, I suspect,
> look at the text generated for a protocol tree entry.
A quick performance boost could be gained with a global variable
being set to tell the proto routines whether the proto_tree under
construction is for display or not.
If not for display, then the vsnprintf call in proto_tree_add_item_value
is not made (or rather, the 'visible' variable in proto_tree_add_item_value
is set to FALSE, which skips the vsnprintf call.
This vsnprintf call is used for proto_tree_add_item_format() and
proto_tree_add_text(). The latter function is the one that is killing us.
--gilbert