Ethereal-dev: Re: [Ethereal-dev] Just as an asside...

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

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Thu, 7 Dec 2000 01:29:04 -0800
On Thu, Dec 07, 2000 at 07:36:53PM +1100, C. L. McAvaney wrote:
> Is it a "bad" thing to just do that then, and call routines that are going to 
> return straight away as the tree is null?  (i.e. in terms of speed of
> ethereal)

I've not measured it directly, by, say, handing a profiled version of
Ethereal a large capture file with variants of dissectors that

	1) check the "tree" argument themselves and skip all the
	   "proto_tree_add_..." calls

and

	2) rely on those calls to do the check.

It probably does slow Ethereal down somewhat; I don't know how much,
however.