Jan-Pieter Cornet wrote: [...]
> As for an object-oriented MIMEDefang... I'm not convinced that is > a good idea. OO does add overhead to perl -- certainly, calling > an object method, compared to accessing a global variable, is a very > costly operation... but of course you need to see that in the > big picture, it depends how often you'd call a method. That's true. However, our commercial CanIt product lines are all heavily OO, and the OO execution overhead seems to be dwarfed by SpamAssassin's execution time. Where OO can hurt (and does hurt us a bit) is memory use. When you start going CPAN-happy and using all kinds of modules in your code, you can really bloat the program. And because of Perl's reference-counted GC scheme, very little data memory is shareable after a fork -- just accessing data touches the reference counts, dirties the memory pages, and requires a copy. That means all your SpamAssassin rules get copied... We've been going through our code eliminating the worst memory-offenders. Some are surprising: A simple "use File::Find;" adds 1.5MB to perl's memory usage. > Then again, when compared to running SpamAssassin, the difference > is probably not measurable, so maybe I'm overreacting. The SpamAssassin code scares me... > Hmm... I just realised that the last time I brought this up, > somebody suggested putting it on a public cvs or svn, I considered > that I good idea.. and... never came around to doing that. > If there's still interest, I can still do so. Sure. If/when we get around to designing MIMEDefang v3, we might make it more of a "bazaar" than "cathedral" project, but we'll see... Regards, David. _______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list [email protected] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

