Re: [squid-users] Complicate ACL affect performance?

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Sat, 18 Oct 2008 16:40:45 +0200

On lör, 2008-10-18 at 12:58 +0300, Henrik K wrote:

> By doing it correctly, using ^hostname$ instead of plain hostname in regex
> results in 1.2 seconds, that's 80000+ hosts/sec..

The interesting pattern match to compare with is

s/^www\.// on the hostnames before making patterns

Then for each hostname
(\.|^)hostname$

or expanded in two patterns depending how well Regexp::Assemble handles
this case.

   \.hostname$
   ^hostname$

blacklists have a quite large proportion domain matches, matching a
complete domain.

Quite likely regex will handle this much better if you reverse the
hostnames, resulting in patterns on the form

 ^emantsoh(\.|$)

Regards
Henrik

Received on Sat Oct 18 2008 - 14:40:51 MDT

This archive was generated by hypermail 2.2.0 : Sat Oct 18 2008 - 12:00:03 MDT