Ethereal-dev: Re: [ethereal-dev] Fun with performance

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

From: Jeff Jahr <jjahr@xxxxxxxxxxxxxx>
Date: Thu, 26 Aug 1999 13:48:31 -0700 (PDT)

On Wed, 25 Aug 1999, Guy Harris wrote:

> > "numtoa()" showed up at the top - all related to "snprintf()" used to,
> > presumably, generate the column data.
> 
> My presumption was wrong.
> 
> Much of it does come from generating the column data, but a lot of it
> comes from generating the protocol tree, which was being done while
> reading the file because I stuck John McDermott's sample color filter
> file in my ".ethereal" directory, and it was running a filter on each
> packet.

	On the subject of performance, I believe [1] that the color filter
code is set up to always try and apply each color filter in the list to
each packet being decoded.

	Changing that function to 'the first matching color filter in list
is the one applied' from 'all matching color filters are applied in order'
would be good optimization with no loss of functionality...

-jsj

[1] as in, I have not checked the code, only observed its behavior.