Re: ayjwork squid3/src HttpRequestMethod...

From: Adrian Chadd <adrian@dont-contact.us>
Date: Sun, 3 Feb 2008 13:01:47 +0900

On Sun, Feb 03, 2008, Amos Jeffries wrote:
> >
> >Please give an example or two, where the performance would noticeably
> >suffer for standard methods.
>
> There were several switch(e->method) in what I think is the request
> processing pathways. I was thinking making that switch into a series of
> string comparisons (on image()) would increase the processing ops where
> the current index int checks are faster.
> src/client_side.cc:630 - clientIsContentLengthValid(HttpRequest * r)
> src/forward.cc:467 - checkRetriable()
>
> I don't think it would be a _great_ sufferance, but it would be a small
> unnecessary backslide. Making the enum 'methods which squid has special
> internal processes for' would be simple and easier to maintain than
> attempting to keep a comprehensive list with unexpected 'others' also
> accepted silently.
> And have the benefit of a low amount of change to the code for the same
> gain.

The current codebase is too poor performing for that particular string
comparsion to have a noticable effect on performance.

Of course, if you guys actually want things to perform comparable to what
other projects are doing in the future, this sort of "death by a thousand
cuts" is one sure fire way to make that more difficult.

Just abstract stuff out enough so the "do i use the ID or do I use a string"
is done in one place, with another method exporting the "data" to use
in the md5 key generation.

Hm!

Adrian
Received on Sat Feb 02 2008 - 20:50:35 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:09 MST