Bug 1294 - triplets.txt loaded and saved in memory after spamd forks
Summary: triplets.txt loaded and saved in memory after spamd forks
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: All All
: P2 normal
Target Milestone: 3.0.0
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-13 14:30 UTC by Duncan Findlay
Modified: 2002-12-21 05:51 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Findlay 2002-12-13 14:30:03 UTC
triplets.txt is loaded into memory the first time word_is_in_dictionary is
called. This happens the first time a tag of some sort is found in the subject.
The code to save the triplets.txt in memory is there, but not useful, since it
isn't run until after spamd forks.

I don't think this is good or logical.

There are 3 possibilities:

1. Do nothing. The file isn't necessary for most messages, so taking the
performance hit when one is found is okay.

2. Change the testing/compilation message to include a unique (looking) subject
id so that triplets.txt is loaded.

3. Scrap the test, because it's not an efficient test, and a bit of a
performance hog.
Comment 1 Justin Mason 2002-12-17 09:45:54 UTC
Subject: Re: [SAdev]  New: triplets.txt loaded and saved in memory after spamd forks 


bugzilla-daemon@hughes-family.org said:

> 1. Do nothing. The file isn't necessary for most messages, so taking the
> performance hit when one is found is okay.

I would vote for this in the short term.  If the test comes out badly in
speed-vs-S/O testing, then we take (3) and scrap it.

--j.

Comment 2 Justin Mason 2002-12-20 06:34:48 UTC
pushing this out of the 2.50 list, since I don't think it's
a big deal ;)
Comment 3 Duncan Findlay 2002-12-20 20:14:35 UTC
Subject: Re: [SAdev]  triplets.txt loaded and saved in memory after spamd forks

> pushing this out of the 2.50 list, since I don't think it's
> a big deal ;)

OTOH, it's trivial.

Comment 4 Justin Mason 2002-12-21 12:20:56 UTC
Subject: Re: [SAdev]  triplets.txt loaded and saved in memory after spamd forks 


see, I think the memory hit is non-trivial.  It'd be extremely easy to
fix, but then mem usage goes up.

Ah, what the hell, for the spamd/mass-check case it's worth it ;)
Patch? ;)

Comment 5 Theo Van Dinter 2002-12-21 14:51:17 UTC
I added in a patch to compile_now.  Basically it calls word_is_in_dictionary
with a known "good" word (it's in triplets.txt).  It seemed like a better choice
than changing the default test message as the rule may change logic later on and
we'd probably forget to update compile_now...