Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 22836 invoked by uid 6000); 12 Mar 1998 23:22:39 -0000 Received: (qmail 22830 invoked from network); 12 Mar 1998 23:22:38 -0000 Received: from twinlark.arctic.org (204.62.130.91) by taz.hyperreal.org with SMTP; 12 Mar 1998 23:22:38 -0000 Received: (qmail 15159 invoked by uid 500); 12 Mar 1998 23:39:49 -0000 Date: Thu, 12 Mar 1998 15:39:45 -0800 (PST) From: Dean Gaudet To: new-httpd@apache.org Subject: Re: BrowserMatch considered harmful In-Reply-To: Message-ID: X-Comment: Visit http://www.arctic.org/~dgaudet/legal for information regarding copyright and disclaimer. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org You probably have a better regex than I'm using. How do things look if you use \. instead of . in the regexes? How about if you combine the three force-response-1.0 into a single regex? Or using ^ anchors where appropriate? But yeah match_headers needs to be changed from O(nm) to O(n+m) (n = #headers, m = #setenvifs). Or at best whack down the constant so that it's O(n+m') where m' = #unique headers in setenvifs. Dean On Fri, 13 Mar 1998, Dmitry Khrustalev wrote: > > On Thu, 12 Mar 1998, Dean Gaudet wrote: > > > Yeah that is ugly... but I'm not seeing a huge difference between having > > the 5 browsermatches and not having them... I still get around 31% of the > > time spent in regexec(), and it's all due to parse_uri_components in that > > case. Do you see the same thing? > > > > No, parse_uri_components accounts for 7.8% here. match_headers - 38.5% > Repeatable with both system and apache regex. http -X + zb -k, ~13kbyte > page. > > -Dima > >