Re: [Wireshark-dev] Small performance improvements to packet-http.c

2007-11-08 Thread Kaul
This time, with the patch attached. On Nov 8, 2007 9:56 PM, Kaul <[EMAIL PROTECTED]> wrote: > I've fixed ep_strndup <-> se_stnrdup, patch attached. > From subjective testings, it seems that there is some measurable > performance improvement - 5-10 percent on my test pcap file (~ > you are not jus

Re: [Wireshark-dev] Small performance improvements to packet-http.c

2007-11-08 Thread Kaul
I've fixed ep_strndup <-> se_stnrdup, patch attached. >From subjective testings, it seems that there is some measurable performance improvement - 5-10 percent on my test pcap file (~ you are not just avoiding a strncmp(), but also the char-by-char search for the space that follows the method (as we

Re: [Wireshark-dev] Small performance improvements to packet-http.c

2007-11-07 Thread Stephen Fisher
On Thu, Nov 08, 2007 at 12:54:14AM +0100, Didier wrote: > Hi, > > On Wed, 7 Nov 2007 11:58:24 +0200, Kaul wrote > > Attached please find a version which reverts back the erroneous printf() > > changes. Sorry. > > There's a bug > conv_data->request_method = ep_strndup("POST", 4); > should be > se

Re: [Wireshark-dev] Small performance improvements to packet-http.c

2007-11-07 Thread Stephen Fisher
On Mon, Nov 05, 2007 at 09:15:45AM +0200, Kaul wrote: > Somewhat inspired by the performance improvements to tvbuff, I've made > some small performance improvements to packet-http.c: > 1. In the most common cases 'GET ', 'POST', 'HTTP' - compare them > against the 32bit value of those strings, in

Re: [Wireshark-dev] Small performance improvements to packet-http.c

2007-11-07 Thread Didier
Hi, On Wed, 7 Nov 2007 11:58:24 +0200, Kaul wrote > Attached please find a version which reverts back the erroneous printf() > changes. Sorry. There's a bug conv_data->request_method = ep_strndup("POST", 4); should be se_strndup Or better: stat_info->request_method = "POST" conv_data->request_m

Re: [Wireshark-dev] Small performance improvements to packet-http.c

2007-11-07 Thread Kaul
Attached please find a version which reverts back the erroneous printf() changes. Sorry. Y. On Nov 7, 2007 11:21 AM, Kaul <[EMAIL PROTECTED]> wrote: > Yes, my bad. I'm just looking if proto_tree_add_string() would be ok. > > On Nov 7, 2007 11:05 AM, Andreas Fink <[EMAIL PROTECTED]> wrote: > > >

Re: [Wireshark-dev] Small performance improvements to packet-http.c

2007-11-07 Thread Kaul
Yes, my bad. I'm just looking if proto_tree_add_string() would be ok. On Nov 7, 2007 11:05 AM, Andreas Fink <[EMAIL PROTECTED]> wrote: > > On 07.11.2007, at 08:56, Kaul wrote: > > Attached please find an updated version of the patch (diff'ed against SVN > 23387). It removes (as discussed below) t

Re: [Wireshark-dev] Small performance improvements to packet-http.c

2007-11-07 Thread Andreas Fink
On 07.11.2007, at 08:56, Kaul wrote: Attached please find an updated version of the patch (diff'ed against SVN 23387). It removes (as discussed below) the redundant check for request/reply and also changes some printf("%s", string) - > printf(string). Let's hope the string doesn't contain

Re: [Wireshark-dev] Small performance improvements to packet-http.c

2007-11-07 Thread Alexey Neyman
Kaul, At the very least, the change of printf("%s", string) -> printf(string) is harmful. For example, in the following chunk: @@ -798,7 +782,7 @@ * request or reply. */ proto_tree_add_text(http_tree, tvb, offset, -

Re: [Wireshark-dev] Small performance improvements to packet-http.c

2007-11-06 Thread Kaul
Attached please find an updated version of the patch (diff'ed against SVN 23387). It removes (as discussed below) the redundant check for request/reply and also changes some printf("%s", string) -> printf(string). I'd be happy to get comments on it, especially if it breaks something. It would be g

[Wireshark-dev] Small performance improvements to packet-http.c

2007-11-04 Thread Kaul
Somewhat inspired by the performance improvements to tvbuff, I've made some small performance improvements to packet-http.c: 1. In the most common cases 'GET ', 'POST', 'HTTP' - compare them against the 32bit value of those strings, instead of strncmp(). I reckon in most cases it'll be used, and th