Gnus development mailing list
 help / color / mirror / Atom feed
* spam.el: exiting groups is really really slow
@ 2003-11-25 22:37 David Z Maze
  2003-11-25 22:58 ` Ted Zlatanov
  0 siblings, 1 reply; 14+ messages in thread
From: David Z Maze @ 2003-11-25 22:37 UTC (permalink / raw)


Having taken the mega spam.el patch via Gnus CVS, exiting groups is
now really really slow.  I think this is because spam-stat-load and
spam-stat-save are pretty expensive operations for me (involves
writing reasonably large files over the network), and
spam-stat-register-{ham,spam}-routine insists on doing both.  Why
can't the spam-stat database be kept in memory and saved when
.newsrc.eld is saved?

-- 
David Maze             dmaze@mit.edu          http://www.mit.edu/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell




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

* Re: spam.el: exiting groups is really really slow
  2003-11-25 22:37 spam.el: exiting groups is really really slow David Z Maze
@ 2003-11-25 22:58 ` Ted Zlatanov
  2003-11-26  8:24   ` Danny Siu
  0 siblings, 1 reply; 14+ messages in thread
From: Ted Zlatanov @ 2003-11-25 22:58 UTC (permalink / raw)
  Cc: ding

On Tue, 25 Nov 2003, dmaze@mit.edu wrote:

> Having taken the mega spam.el patch via Gnus CVS, exiting groups is
> now really really slow.  I think this is because spam-stat-load and
> spam-stat-save are pretty expensive operations for me (involves
> writing reasonably large files over the network), and
> spam-stat-register-{ham,spam}-routine insists on doing both.  Why
> can't the spam-stat database be kept in memory and saved when
> .newsrc.eld is saved?

I thought loading & saving was not a big deal but you're right, it's a
pain.  Plus, the hooks were already being installed properly, so what
I did was totally retarded.  I've taken out the save/load code,
thanks!

Ted



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

* Re: spam.el: exiting groups is really really slow
  2003-11-25 22:58 ` Ted Zlatanov
@ 2003-11-26  8:24   ` Danny Siu
       [not found]     ` <7coeuzzg6c.fsf@nature.tsukuba.ac.jp>
  0 siblings, 1 reply; 14+ messages in thread
From: Danny Siu @ 2003-11-26  8:24 UTC (permalink / raw)


Ted,

On related subject about spam-stat-save:

I have the following in my gnus-exit-gnus-hook
  (let ((coding-system-for-write 'emacs-mule)) (spam-stat-save))

Without that, Emacs would complain about the coding system when saving the
my spam stat file.

Now that spam-stat-save is done at spam.el level, I think it should allow
user to set whatever coding system for his spam stat file rather then
relying the default coding system.

Ted Zlatanov writes:

  Ted> On Tue, 25 Nov 2003, dmaze@mit.edu wrote:
  >> Having taken the mega spam.el patch via Gnus CVS, exiting groups is now
  >> really really slow.  I think this is because spam-stat-load and
  >> spam-stat-save are pretty expensive operations for me (involves writing
  >> reasonably large files over the network), and
  >> spam-stat-register-{ham,spam}-routine insists on doing both.  Why can't
  >> the spam-stat database be kept in memory and saved when .newsrc.eld is
  >> saved?

  Ted> I thought loading & saving was not a big deal but you're right, it's
  Ted> a pain.  Plus, the hooks were already being installed properly, so
  Ted> what I did was totally retarded.  I've taken out the save/load code,
  Ted> thanks!

  Ted> Ted

-- 
Danny Dick-Fung Siu              mailto:dsiu@adobe.com
Advanced Technology Group @ Adobe Systems Incorporated





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

* Re: spam.el: exiting groups is really really slow
       [not found]     ` <7coeuzzg6c.fsf@nature.tsukuba.ac.jp>
@ 2003-11-26 15:41       ` Ted Zlatanov
  2003-11-26 17:26         ` David Z Maze
  2003-11-26 20:34         ` Danny Siu
  2003-11-26 20:33       ` Danny Siu
  1 sibling, 2 replies; 14+ messages in thread
From: Ted Zlatanov @ 2003-11-26 15:41 UTC (permalink / raw)
  Cc: ding, David Z. Maze

On Wed, 26 Nov 2003, pooh@nature.tsukuba.ac.jp wrote:

> Danny Siu <dsiu@adobe.com> writes:
> 
>> I have the following in my gnus-exit-gnus-hook
>>   (let ((coding-system-for-write 'emacs-mule)) (spam-stat-save))
>>
>> Without that, Emacs would complain about the coding system when
>> saving the my spam stat file.
> 
> I use following setting.
> 
> (modify-coding-system-alist
>  'file "/\\.spam-stat\\.el\\'" 'emacs-mule)

Actually, spam-stat.el is David Maze's baby, so I don't want to make
these decisions for him.  Let's see what David says.  I'm OK with
either the lexical-let or the coding system modifications.

Ted



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

* Re: spam.el: exiting groups is really really slow
  2003-11-26 15:41       ` Ted Zlatanov
@ 2003-11-26 17:26         ` David Z Maze
  2003-12-01 20:58           ` Ted Zlatanov
  2003-11-26 20:34         ` Danny Siu
  1 sibling, 1 reply; 14+ messages in thread
From: David Z Maze @ 2003-11-26 17:26 UTC (permalink / raw)
  Cc: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> Actually, spam-stat.el is David Maze's baby, so I don't want to make
> these decisions for him.  Let's see what David says.  I'm OK with
> either the lexical-let or the coding system modifications.

It *is*?  That's news to me.

-- 
David Maze             dmaze@mit.edu          http://www.mit.edu/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell




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

* Re: spam.el: exiting groups is really really slow
       [not found]     ` <7coeuzzg6c.fsf@nature.tsukuba.ac.jp>
  2003-11-26 15:41       ` Ted Zlatanov
@ 2003-11-26 20:33       ` Danny Siu
  1 sibling, 0 replies; 14+ messages in thread
From: Danny Siu @ 2003-11-26 20:33 UTC (permalink / raw)



Thanks!  This is a more global way to do the same thing.

Hiroshi Fujishima writes:

  Hiroshi> Danny Siu <dsiu@adobe.com> writes:
  >> I have the following in my gnus-exit-gnus-hook (let
  >> ((coding-system-for-write 'emacs-mule)) (spam-stat-save))
  >> 
  >> Without that, Emacs would complain about the coding system when saving
  >> the my spam stat file.

  Hiroshi> I use following setting.

  Hiroshi> (modify-coding-system-alist
  Hiroshi>  'file "/\\.spam-stat\\.el\\'" 'emacs-mule)

  Hiroshi> -- Hiroshi Fujishima


-- 
Danny Siu




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

* Re: spam.el: exiting groups is really really slow
  2003-11-26 15:41       ` Ted Zlatanov
  2003-11-26 17:26         ` David Z Maze
@ 2003-11-26 20:34         ` Danny Siu
  1 sibling, 0 replies; 14+ messages in thread
From: Danny Siu @ 2003-11-26 20:34 UTC (permalink / raw)
  Cc: ding, David Z. Maze


Maybe it is Alex?

;;; spam-stat.el --- detecting spam based on statistics

;; Copyright (C) 2002, 2003 Free Software Foundation, Inc.

;; Author: Alex Schroeder <alex@gnu.org>

Ted Zlatanov writes:

  Ted> On Wed, 26 Nov 2003, pooh@nature.tsukuba.ac.jp wrote:
  >> Danny Siu <dsiu@adobe.com> writes:
  >> 
  >>> I have the following in my gnus-exit-gnus-hook (let
  >>> ((coding-system-for-write 'emacs-mule)) (spam-stat-save))
  >>> 
  >>> Without that, Emacs would complain about the coding system when saving
  >>> the my spam stat file.
  >> 
  >> I use following setting.
  >> 
  >> (modify-coding-system-alist 'file "/\\.spam-stat\\.el\\'" 'emacs-mule)

  Ted> Actually, spam-stat.el is David Maze's baby, so I don't want to make
  Ted> these decisions for him.  Let's see what David says.  I'm OK with
  Ted> either the lexical-let or the coding system modifications.

  Ted> Ted

-- 
Danny Dick-Fung Siu              mailto:dsiu@adobe.com
Advanced Technology Group @ Adobe Systems Incorporated





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

* Re: spam.el: exiting groups is really really slow
  2003-11-26 17:26         ` David Z Maze
@ 2003-12-01 20:58           ` Ted Zlatanov
  2003-12-02 11:54             ` Alex Schroeder
  0 siblings, 1 reply; 14+ messages in thread
From: Ted Zlatanov @ 2003-12-01 20:58 UTC (permalink / raw)
  Cc: Hiroshi Fujishima, ding, Alex Schroeder

On Wed, 26 Nov 2003, dmaze@mit.edu wrote:

> Ted Zlatanov <tzz@lifelogs.com> writes:
> 
>> Actually, spam-stat.el is David Maze's baby, so I don't want to
>> make these decisions for him.  Let's see what David says.  I'm OK
>> with either the lexical-let or the coding system modifications.
> 
> It *is*?  That's news to me.

Sorry.  It's Alex Schroeder.  Alex, let me know if you need more
background, but basically it would be nice if spam-stat.el did a 
(let ((coding-system-for-write 'emacs-mule))) for (spam-stat-save).

Ted



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

* Re: spam.el: exiting groups is really really slow
  2003-12-01 20:58           ` Ted Zlatanov
@ 2003-12-02 11:54             ` Alex Schroeder
  2003-12-02 18:34               ` Ted Zlatanov
  0 siblings, 1 reply; 14+ messages in thread
From: Alex Schroeder @ 2003-12-02 11:54 UTC (permalink / raw)
  Cc: Hiroshi Fujishima, ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> Sorry.  It's Alex Schroeder.  Alex, let me know if you need more
> background, but basically it would be nice if spam-stat.el did a 
> (let ((coding-system-for-write 'emacs-mule))) for (spam-stat-save).

I haven't been a diligent ding-reader lately, but the short summary
you're giving makes sense.  Is emacs-mule really preferred?
In BBDB we're using the following, for example:

;; iso-2022-7bit should be OK (but not optimal for Emacs, at least --
;; emacs-mule would be better) with both Emacs 21 and XEmacs.  Emacs
;; 22 will really need utf-8-emacs.
(defconst bbdb-file-coding-system (if (fboundp 'coding-system-p)
                      (if (coding-system-p 'utf-8-emacs)
                      'utf-8-emacs
                    'iso-2022-7bit))
  "Coding system used for reading and writing `bbdb-file'.
This should not be changed by users.")

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's first law:
OOO  The coffee at the office shall taste terrible.




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

* Re: spam.el: exiting groups is really really slow
  2003-12-02 11:54             ` Alex Schroeder
@ 2003-12-02 18:34               ` Ted Zlatanov
       [not found]                 ` <7ck75dzlfd.fsf@nature.tsukuba.ac.jp>
  2003-12-10 23:07                 ` Ted Zlatanov
  0 siblings, 2 replies; 14+ messages in thread
From: Ted Zlatanov @ 2003-12-02 18:34 UTC (permalink / raw)
  Cc: David Z Maze, Hiroshi Fujishima, ding

On Tue, 02 Dec 2003, alex@emacswiki.org wrote:

> I haven't been a diligent ding-reader lately, but the short summary
> you're giving makes sense.  Is emacs-mule really preferred?

I'm OK with utf-8-emacs, iso-2022-7bit, or anything else.  I think
the user should be able to customize this slightly (use default,
answer the query when saving, or use a specific coding system).

If you get this figured out, I'll probably steal the code for spam
blacklists and whitelists.

Ted



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

* Re: spam.el: exiting groups is really really slow
       [not found]                 ` <7ck75dzlfd.fsf@nature.tsukuba.ac.jp>
@ 2003-12-03 23:40                   ` Alex Schroeder
  0 siblings, 0 replies; 14+ messages in thread
From: Alex Schroeder @ 2003-12-03 23:40 UTC (permalink / raw)
  Cc: David Z Maze, ding

Hiroshi Fujishima <pooh@nature.tsukuba.ac.jp> writes:

>> I'm OK with utf-8-emacs, iso-2022-7bit, or anything else.  I think
>> the user should be able to customize this slightly (use default,
>> answer the query when saving, or use a specific coding system).
>
> I don't use emacs-mule but iso-2022-7bit as coding-system of
> ~/.spam-stat.el to see it from outside of Emacs (such as terminal
> emulator) and share it with Emacs and XEmacs.

Hm; I think the reason for the conditional code in BBDB is that
XEmacs non-mule doesn't have most of these coding-systems available.

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's first law:
OOO  The coffee at the office shall taste terrible.




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

* Re: spam.el: exiting groups is really really slow
  2003-12-02 18:34               ` Ted Zlatanov
       [not found]                 ` <7ck75dzlfd.fsf@nature.tsukuba.ac.jp>
@ 2003-12-10 23:07                 ` Ted Zlatanov
  2003-12-12 10:48                   ` Alex Schroeder
  1 sibling, 1 reply; 14+ messages in thread
From: Ted Zlatanov @ 2003-12-10 23:07 UTC (permalink / raw)
  Cc: David Z Maze, Hiroshi Fujishima, ding

On Tue, 02 Dec 2003, tzz@lifelogs.com wrote:

On Tue, 02 Dec 2003, alex@emacswiki.org wrote:
> 
>> I haven't been a diligent ding-reader lately, but the short summary
>> you're giving makes sense.  Is emacs-mule really preferred?
> 
> I'm OK with utf-8-emacs, iso-2022-7bit, or anything else.  I think
> the user should be able to customize this slightly (use default,
> answer the query when saving, or use a specific coding system).
> 
> If you get this figured out, I'll probably steal the code for spam
> blacklists and whitelists.

Alex,

I haven't seen a response, maybe due to my MTA problems recently.
Did you have a preference?  Do you want me to make the change?

Thanks
Ted



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

* Re: spam.el: exiting groups is really really slow
  2003-12-10 23:07                 ` Ted Zlatanov
@ 2003-12-12 10:48                   ` Alex Schroeder
  2003-12-12 21:45                     ` Ted Zlatanov
  0 siblings, 1 reply; 14+ messages in thread
From: Alex Schroeder @ 2003-12-12 10:48 UTC (permalink / raw)
  Cc: Hiroshi Fujishima, ding

Ted Zlatanov <tzz@lifelogs.com> writes:

>> I'm OK with utf-8-emacs, iso-2022-7bit, or anything else.
>
> I haven't seen a response, maybe due to my MTA problems recently.
> Did you have a preference?  Do you want me to make the change?

Yeah, real-life problems, and being unsure of what the best solution
is.  There was another coding-system question on xemacs-design lately;
the discussion was for or against coding cookies (and I agree with the
position that says iso-2022-jp is better than coding cookies, because
all iso-2022 systems (including emacs-mule, by the way) are basically
bytes with embedded escape sequences indicating what coding system is
being used.  What this means for XEmacs users that switch from mule to
non-mule I don't know.  I *think* it means that they have to throw
away their spam-stat file.  Is that ok with you?

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's first law:
OOO  The coffee at the office shall taste terrible.




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

* Re: spam.el: exiting groups is really really slow
  2003-12-12 10:48                   ` Alex Schroeder
@ 2003-12-12 21:45                     ` Ted Zlatanov
  0 siblings, 0 replies; 14+ messages in thread
From: Ted Zlatanov @ 2003-12-12 21:45 UTC (permalink / raw)
  Cc: David Z Maze, Hiroshi Fujishima, ding

On Fri, 12 Dec 2003, alex@emacswiki.org wrote:

> Ted Zlatanov <tzz@lifelogs.com> writes:
> 
>>> I'm OK with utf-8-emacs, iso-2022-7bit, or anything else.
>>
>> I haven't seen a response, maybe due to my MTA problems recently.
>> Did you have a preference?  Do you want me to make the change?
> 
> Yeah, real-life problems, and being unsure of what the best solution
> is.  There was another coding-system question on xemacs-design
> lately; the discussion was for or against coding cookies (and I
> agree with the position that says iso-2022-jp is better than coding
> cookies, because all iso-2022 systems (including emacs-mule, by the
> way) are basically bytes with embedded escape sequences indicating
> what coding system is being used.  

Maybe it's best to give these choices:

- none
- emacs-mule
- utf-8
- user-specified

And make emacs-mule the sensible default.  I'm just guessing though,
I don't know much about Emacs coding systems.

> What this means for XEmacs users that switch from mule to non-mule I
> don't know.  I *think* it means that they have to throw away their
> spam-stat file.  Is that ok with you?

We can always provide a backwards-portability function, no?

Ted



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

end of thread, other threads:[~2003-12-12 21:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-25 22:37 spam.el: exiting groups is really really slow David Z Maze
2003-11-25 22:58 ` Ted Zlatanov
2003-11-26  8:24   ` Danny Siu
     [not found]     ` <7coeuzzg6c.fsf@nature.tsukuba.ac.jp>
2003-11-26 15:41       ` Ted Zlatanov
2003-11-26 17:26         ` David Z Maze
2003-12-01 20:58           ` Ted Zlatanov
2003-12-02 11:54             ` Alex Schroeder
2003-12-02 18:34               ` Ted Zlatanov
     [not found]                 ` <7ck75dzlfd.fsf@nature.tsukuba.ac.jp>
2003-12-03 23:40                   ` Alex Schroeder
2003-12-10 23:07                 ` Ted Zlatanov
2003-12-12 10:48                   ` Alex Schroeder
2003-12-12 21:45                     ` Ted Zlatanov
2003-11-26 20:34         ` Danny Siu
2003-11-26 20:33       ` Danny Siu

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).