Joshua Slive wrote: >>From: Brian Pane [mailto:[EMAIL PROTECTED]] >> > >>>Can you really benchmark speed differences between the two? >>> >>> >>Yes. And the difference is quite large. >> > > You've tried out Apache with the two different methods of exclusion and > found that the LogExclude method results in a server that can serve > significantly more traffic? I'm surprised! >
FYI. [iyh@flame test]$ ./regex "image\/(gif|jpg|png|jpeg|ico)" image/gif 1000000 Match Time to run 1000000 regex's 2709118 Time to run 1000000 hash (no find)'s 316925 Time to run 1000000 hash (find)'s 458499 [iyh@flame test]$ ./regex "image\/(gif|jpg|png|jpeg|ico)" text/html 1000000 No Match Time to run 1000000 regex's 690231 Time to run 1000000 hash (no find)'s 317154 Time to run 1000000 hash (find)'s 457658 this uses glib's regex, not PCRE's > >>I'm mildly alarmed that we're actually advocating it as a general-purpose >>solution in the documentation URLs listed above; we really should warn >>readers that the processing cost scales linearly with the number of rules. >> > > There are many directives in apache that work like this, including > name-virtual hosts, Redirects, Aliases, etc. My guess is that for 99% of > cases, all these things put together are lost in the backround noise of > disk/network speed. > > Now, for those 1% of cases where these things matter, I'm fully in favour of > designing fast-path shortcuts so that someone who wants a really fast, but > not too flexible, server can have it. But we should try to do it in a way > that doesn't make configuration terribly complicated. > > Joshua. > >
