Jakub Zawadzki | 11 Jun 2012 21:24
Picon

Linear search in value_string_ext

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'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?
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe

Bill Meier | 11 Jun 2012 21:35
Favicon

Re: Linear search in value_string_ext

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

___________________________________________________________________________
(Continue reading)


Gmane