Wireshark-dev: Re: [Wireshark-dev] Finding duplicate (conflicting) value_string entries
From: Jeff Morriss <[email protected]>
Date: Wed, 18 May 2011 13:36:11 -0400
Jakub Zawadzki wrote:
On Wed, May 18, 2011 at 05:10:09PM +0100, Martin Mathieson wrote:
On Wed, May 18, 2011 at 4:49 PM, Jakub Zawadzki <nospam> wrote:
This patch is OK for me.
I didn't measure, but it didn't noticibly add to the startup time
This O(n^2) loop sucks a little, you can optimized it with some hashing 
or bit-setting/checking. 
But really please don't care about startup-time. It's not so important.
Well, I'd disagree with startup time not being important... :-)  I 
sometimes start Wireshark many times a day, sometimes on not-very-fast 
probably not many non-developers run wireshark that way though.
I wasn't planning on submitting it in its current form.
I think non-developers really don't care about whole tmp_fld_check_assert() check,
so one extra is good (and yours patch is really cool).

tmp_fld_check_assert() probably should be #ifdef-ed in some MAINTAINER_BUILD (or #ifndef RELEASE_BUILD)
I'd thought of that before, but we definitely want it enabled for all 
non-release builds (some of those checks save you a crash later on). 
Even the first compiles in the release builds should have it enabled to 
ensure ft sanity.
And, these days, these checks are also useful for scripters (Lua or 
Python); see bug 5930 for an example of where the Lua error checking 
hadn't kept up with the tmp_fld_check_assert() checking.