From: Michel B. <mi...@bo...> - 2005-02-15 15:48:50
|
Le Mardi 15 F=E9vrier 2005 16:31, Lionel Bouton a =E9crit : > > Thanks, I'm worried about the size of the regexp though. There are two > things on my mind : > - is it maintainable ? I don't think it will need much maintenance. It's based on a (yet more=20 complex ;-) regexp I have built over years, and that very seldom needs=20 changes -- and the changes are improvements that are not strictly speakin= g=20 necessary nor urgent. Maintaining such a regexp is not that complex if you are careful ;-)=20 especially about line breaks if you split it into several lines (it seems= =20 that an escaped line break should NOT be put after a ) or } or ? or the=20 regexp won't work. I limit myself to splitting after "regular characters"= and=20 before a "|". > - how much processing time is needed for these regexp ? Given that we just process a short hostname and not a long file, and give= n=20 that Perl will compile the regexp only once except for the one that conta= ins=20 part of the IP as a variable, I believe the processing time should be=20 negligible (compared to the database accesses etc.) > I'd like to add this as a separate algorithm and put the regexp in > external files that can be reloaded I would hardcode this. I expect very little changes to this, if any. Load= ing=20 the regexps from external files would make this still more complex and=20 subject to errors... > I've not access on enough maillog to test > these regexps on each update. Are you willing to maintain them ? No problem, but as I said, expect very little change unless I discover a = major=20 boooog ;-) > I'll probably start the 1.5.x branch for this new algorithm. Meanwhile, you can test it on your own system, I don't think you'll notic= e any=20 performance impact, but it will probably be more accurate that the basic = IP=20 address test (see my last post with some examples...) Cheers. --=20 Michel Bouissou <mi...@bo...> OpenPGP ID 0xDDE8AC6E |