Re: regular expression optimisation patch

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 02 Jun 2011 17:06:07 +1200

On 01/06/11 09:18, Marcus Kool wrote:
> Hi,
>
> after some emails with Amos I agreed to make a patch for
> squid to optimise lists of regular expressions. The
> optimisations are:
> * initial .* is stripped
> * RE-1 RE-2 ... RE-n are joined into one large RE: (RE-1)|(RE-2)|...|(RE-n)
> * -i ... -i options are optimised: the second one is ignored, same for +i
>
> The only modified file is src/acl/RegexData.cc
>
> My question for submitting the patch:
> how do want the patch? is the output of the following command OK?
> LC_ALL=C TZ=UTC0 diff -Naur src/acl/RegexData.cc src/acl/RegexData.cc.orig

That should be fine.

>
> I used a test set: a squid.conf, two files with regular expressions
> and a file with wget commands to test URLs.
> Do you want/need these?

That would be helpful for unit-tests. So yes, thank you.

>
> How to post the patch ?

As attachment please, with [PATCH] subject prefix and a description
suitable for commit message. From an email you are happy adding
permanently to the credits records.

>
> I am not subscribed to the squid-dev mailing list. Please reply
> to my email address also.
>
> Thanks
>
> Marcus Kool

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.12
   Beta testers wanted for 3.2.0.8 and 3.1.12.2
Received on Thu Jun 02 2011 - 05:06:16 MDT

This archive was generated by hypermail 2.2.0 : Thu Jun 02 2011 - 12:00:05 MDT