Gnus development mailing list
 help / color / mirror / Atom feed
* Backgrounded bogofilter learning
@ 2009-10-14 23:45 Brian Sniffen
  2009-10-16 14:12 ` Ted Zlatanov
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Sniffen @ 2009-10-14 23:45 UTC (permalink / raw)
  To: ding

May I propose running bogofilter's training mode in the background for
better performance?

--- spam.el.~7.105.~	2009-10-13 18:31:56.000000000 -0400
+++ spam.el	2009-10-13 18:33:15.000000000 -0400
@@ -2554,7 +2554,7 @@
 	      (apply 'call-process-region
 		     (point-min) (point-max)
 		     spam-bogofilter-program
-		     nil nil nil switch
+		     nil 0 nil switch
 		     (if db `("-d" ,db "-v") `("-v")))))))
     (gnus-error 5 "`spam.el' doesn't support obsolete bogofilter versions")))

It's more fragile if bogofilter fails, but *much* faster in most uses.
 And if your local bogofilter install is busted, you'll find out when
you use a synchronous call-process-region to read data from it.

-Brian

-- 
Brian Sniffen
http://evenmere.org/~bts/
<bts@evenmere.org>



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Backgrounded bogofilter learning
  2009-10-14 23:45 Backgrounded bogofilter learning Brian Sniffen
@ 2009-10-16 14:12 ` Ted Zlatanov
  0 siblings, 0 replies; 2+ messages in thread
From: Ted Zlatanov @ 2009-10-16 14:12 UTC (permalink / raw)
  To: ding

On Wed, 14 Oct 2009 19:45:45 -0400 Brian Sniffen <bts@evenmere.org> wrote: 

BS> May I propose running bogofilter's training mode in the background for
BS> better performance?

BS> --- spam.el.~7.105.~	2009-10-13 18:31:56.000000000 -0400
BS> +++ spam.el	2009-10-13 18:33:15.000000000 -0400
BS> @@ -2554,7 +2554,7 @@
BS>  	      (apply 'call-process-region
BS>  		     (point-min) (point-max)
BS>  		     spam-bogofilter-program
BS> -		     nil nil nil switch
BS> +		     nil 0 nil switch
BS>  		     (if db `("-d" ,db "-v") `("-v")))))))
BS>      (gnus-error 5 "`spam.el' doesn't support obsolete bogofilter versions")))

BS> It's more fragile if bogofilter fails, but *much* faster in most uses.
BS>  And if your local bogofilter install is busted, you'll find out when
BS> you use a synchronous call-process-region to read data from it.

I'd make it a backend option, on by default to ensure the user can go
back if needed.  Can you add that or do you need me to do it?

Generally, I'm trying to avoid big changes to spam.el.  I plan to work
on spam2.el instead.  If you have opinions or suggestions on spam.el
(thinking of redesigning everything from the ground up, keeping only the
good bits), please send them here.

Thanks
Ted




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-16 14:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-14 23:45 Backgrounded bogofilter learning Brian Sniffen
2009-10-16 14:12 ` Ted Zlatanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).