regular expression optimisation patch

From: Marcus Kool <marcus.kool_at_urlfilterdb.com>
Date: Tue, 31 May 2011 18:18:25 -0300

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

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?

How to post the patch ?

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

Thanks

Marcus Kool
Received on Tue May 31 2011 - 21:18:31 MDT

This archive was generated by hypermail 2.2.0 : Wed Jun 01 2011 - 12:00:07 MDT