SA Bugzilla – Bug 1294
triplets.txt loaded and saved in memory after spamd forks
Last modified: 2002-12-21 05:51:17 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.
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.
pushing this out of the 2.50 list, since I don't think it's a big deal ;)
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.
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? ;)
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...