From: Fabian K. <fre...@fa...> - 2008-02-26 19:00:40
|
About a year ago, Fabian Keil <fre...@fa...> wrote: > Adam Piggott <ad...@pr...> wrote: > > > I've always wondered why regexps in the domain string are so limited, > > such as not being able to use [abc], (yes|no|maybe), etc. Supporting > > this would cut down my actions file quite considerably. > > > > I figured there must be a good reason but haven't been able to find any > > discussion on it, any takers? > > Andreas gave some of his reasons in this thread: > http://sourceforge.net/mailarchive/forum.php?thread_id=1758329&forum_id=1690 > > Note, however, that he mainly argues against using one large > PCRE for the whole URL, not against keeping domain, path and port > separate, but to use PCRE for the domain string as well. > > I think doing the latter has several advantages > and should be done sooner or later, but of course > someone has to step up and actually do it. Unless there are any objections, I will start working on this once Privoxy-Regression-Test is able to verify that the default.action file sections do what they are supposed to do. > If there are good reasons against it, I'd like to > hear about them as well. Andreas mentions "speed", > but I don't think it really matters here. > > Without any benchmarks it's hard to know if it's > true anyway. I would assume that PCRE is heavily > optimised and it might even be faster than Privoxy's > own matching. It would probably also reduce the number > of URL patterns we need and thus could speed-up things > again. > > As mentioned above, I don't think URL pattern matching > is currently a bottleneck anyway and even if PCRE would > be a bit slower it might not be noticeable. I still think that it doesn't matter from a performance point of view and expect the biggest disadvantage to be that dots in domains would have to be escaped. Fabian |