Ethereal-dev: Re: [Ethereal-dev] Ethereal performance, after Guy's changes ...

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 21 Nov 2003 11:11:34 -0800

On Nov 21, 2003, at 6:02 AM, didier wrote:

Ok, I was thinking about all calls to proto_tree_add_text in dissectors.
cf attached patch for ip.

Those eliminate calls to "check_col()" (by caching the result of the first call), and eliminate calls to "proto_item_append_text()", but they don't eliminate any "sprintf()"/"snprintf()" calls - the "check_col()" calls would have prevented "col_add_fstr()" from being called, and "proto_item_append_text()" doesn't do any formatting if the "visible" flag isn't set on the tree ("proto_tree_add_text()" calls "proto_tree_set_representation()" even if "visible" isn't set, but "proto_tree_set_representation()" doesn't do any work if it's not set).

So it'd probably increase performance some, but not a lot - I'll try it at some point to see what the performance change is, but as it's only patching one dissector, it might not make a big difference, so I'll look at the other dissectors that would be used heavily in my big test capture.