[squid-dev] [PATCH] HTTP request-line parser upgrade

Amos Jeffries squid3 at treenet.co.nz
Mon Feb 9 20:45:47 UTC 2015


On 10/02/2015 6:12 a.m., Kinkie wrote:
> Hi,
>   I am not sure whether this is the most uptodate version of the
> patch; I'm auditing lp:~yadi/squid/parser-ng-requestline revno 13879.
> 

Yes thats the latest right now.

> Short story, I can find nothing obviously evil with it - code is well
> documented and intent is clear; as far as I understand Polygraph,
> Coadvisor and my casual testing all agree that it introduces no
> regressions so for me it could go in right away.
> 
> Only suggestion (non-binding):
> 
> in HttpRequestMethod::HttpRequestMethod:
>  // TODO: Optimize this linear search
>  I suspect this code path is rather hot, and I'd recommend to use a
> trie, a hash or a map here ASAP
> 

That code is rather hot. The search list is ordered by decrementing
expected frequency of values so lookup time is not too bad, and already
optimal for the GET case. Though it would still be worth going to the
new trie or customized search you are working on when those are in trunk.

Amos



More information about the squid-dev mailing list