Wireshark mailing list archives

Re: Linear search in value_string_ext


From: Bill Meier <wmeier () newsguy com>
Date: Mon, 11 Jun 2012 15:35:47 -0400

On 6/11/2012 3:24 PM, Jakub Zawadzki wrote:
Hi,

Bill recently converted lot of code which were using value_string API to
"newer" value_string_ext API.

But the problem is that not all value_string arrays are sorted for
faster access.

If value_string_ext is used in hfinfo it can be easily found with oneliner:
   $ ./tshark -G values | grep ^E | grep 'Linear Search'

Currently it outputs:
   E       ip.dsfield.dscp 21      dscp_vals       [Linear Search]
   E       rsvp.object     57      rsvp_class_vals [Linear Search]


I was about to do the check...    :)

Looks like I missed two "not ordered" cases; I'll fix them.

I've reorder items once in r42418, but I'm not sure if **primary** efford
is to convert all value_string to _ext variant, and remove "old" API,
or to optimize code. Bill?

I'm just optimizing as I go along ...

Bill

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: