You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2005/07/25 00:12:16 UTC
Re: [Bug 4497] New: reorganise PerMsgStatus code
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Daniel Quinlan writes:
> "Loren Wilton" <lw...@earthlink.net> writes:
>
> > Is there a way that [user rules] could be saved in a more-compiled
> > state when used with spamd and similar? Maybe name the rules with the
> > username as part of the procedure name, and just add them to the
> > namespace the first time encountered?
>
> Beyond the memory bloating this could potentially cause and the
> potentially more complicated security aspects, it's important to
> optimize for the common case. I've been thinking we might be able to
> move all user rules into their own priority and then *only* those would
> be slower and overall performance would be as good as reasonably
> possible. Also, when there are no user rules, the user rule priority
> could just be skipped for good performance.
>
> In the long run, it might even be possible to give user rules priorities
> based on the user name (non-numeric ones) so they could be cached.
I don't get it -- how does that help?
- --j.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Exmh CVS
iD8DBQFC5BJAMJF5cimLx9ARAtu/AKCaOu6/yYj46MxHwXiwiEfU54JdPwCfQhSM
6fR7KmFEJfaCgvZ/B3NJTzw=
=0/Gr
-----END PGP SIGNATURE-----
Re: [Bug 4497] New: reorganise PerMsgStatus code
Posted by Daniel Quinlan <qu...@pathname.com>.
Justin Mason <jm...@jmason.org> writes:
> I don't get it -- how does that help?
Basically, user rule would always run last. Something like:
for (@priorities) {
standard prorities loop
}
if ($allow_user_rules && $defined_rules{$user}) {
do_xxx_tests($user, ...); # $user is the priority
do_yyy_tests($user, ...);
}
Precompiling could be done by an early Plugin that runs an init message
on each user that has configuration. The do_xxx_tests routines should
not care about whether you are doing user rules, ideally.
Daniel
--
Daniel Quinlan
http://www.pathname.com/~quinlan/