Marking a lot of messages as junk or not junk freezes the app



15 years ago
10 years ago


(Reporter: mscott, Unassigned)


(Blocks: 1 bug, {perf})

Windows XP

Firefox Tracking Flags

(Not tracked)




15 years ago
When manually marking a set of messages as junk or not junk (i.e. during the
training phase), the DBView tells the junk plugin to classify each message
individually. It sits in a tight for loop in nsMsgDBView::ApplyCommandToIndices
calling nsBayesianFilter::SetMessageClassification.

This causes the junk mail plugin to end up firing n message fetch urls all at
the same time. If I select a 1,000 message folder and mark them as not junk, we
create 1,000 urls and they all try to load at the same time.

We should be queuing these up and running one url at a time.

The bayesian filter already has a class which can be used for classifying a
batch of message URIs. It even trys to re-use the same tokenizer object to
reduce memory allocations. We need to expand that class to also work with an
array of message URIs that the user has changed the junk status on.

Fixing this bug entails two parts:

1) Changings nsMsgDBView to make a single call with all of the URIs the user has
marked as junk/not junk.

2) nsBayesianFilter needs to merge the user classifier:
nsBayesianFilter::SetMessageClassification which creates a single
MessageObserver class which is used to listen for the parsed tokens and add them
to the training set


nsBayesianFilter::ClassifyMessages which uses a MessageClassifier class which
knows how to deal with an array of message URIs requiring classification.

Comment 1

15 years ago
bug 179504 seems like a dup

Comment 2

15 years ago
other possible dupes are bug 179504 and bug 135000
Product: MailNews → Core

Comment 3

12 years ago
*** Bug 302530 has been marked as a duplicate of this bug. ***

Comment 4

10 years ago
Scott, David, comment 0 is still accurate, correct?  I don't see any bugs/fixes that have attempted to address these issues.
Severity: normal → major
Keywords: perf
QA Contact: laurel → filters


10 years ago
Product: Core → MailNews Core


10 years ago
Assignee: mscott → nobody
Kent how difficult would this be to implement ?

Comment 6

10 years ago
I don't think that is accurate anymore. Manual marking is done in junkCommands.js, which sends off URLs one at a time. See bug 324953.
Fixing as invalid based on comment 6
Last Resolved: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.