Closed Bug 232455 Opened 21 years ago Closed 19 years ago

RFE: Search Performance Suggestion for "Match All"

Categories

(SeaMonkey :: MailNews: Message Display, enhancement)

x86
Linux
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 166502

People

(Reporter: dave, Unassigned)

References

()

Details

(Keywords: perf)

User-Agent:       
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

By external "black box" observation of performance, it appears that Search works
two ways (if I'm wrong, this whole enhancement suggestion is bogus)

1. If all the fields being matched are headers, it works off the .msf file

2. If one or more of them is Body, it performs a full scan of the folder mailbox
file

For a "Matches all" (AND'ed) Search, it would in many cases** be faster to use
the following algorithm:

1. Count which of the matching criteria are indexed (e.g. Subject) and which are
not (e.g. Body) 
2. If both are non-zero, and the mode is Match All, then first scan the .msf
file for the indexed criteria, and produce a list of candidate messages
3. this list is then used to pick single messages and scan the full text of
those messages only
4. If desired to maintain the progressive result presentation, steps 2. and 3.
could be pipelined; this would also avoid potential memory scalability issues
and allow it to take advantage of multi-CPU systems (though in most cases I
suspect I/O is the limiting factor and it would be better to do the whole MSF
followed by a whole mailbox)




** especially on a laptop -> slow drive :-)



Also, as an aside, I think "Matches All" would be a better default than "Matches
Any" - perhaps the selection could be made sticky (persisted as a user preference?)

Reproducible: Always
Steps to Reproduce:
N/A

Actual Results:  
N/A

Expected Results:  
Suggest alternative algorithm, per the details above

N/A
Keywords: perf
Bug 154867 makes the same suggestion.  This might be a dup.
Product: Browser → Seamonkey
Assignee: sspitzer → mail

*** This bug has been marked as a duplicate of 166502 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Component: MailNews: Search → MailNews: Message Display
QA Contact: laurel → search
You need to log in before you can comment on or make changes to this bug.