Closed Bug 381999 Opened 17 years ago Closed 17 years ago

search with multiple conditions should short-circuit the more time-consuming ones

Categories

(Thunderbird :: General, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 295088

People

(Reporter: fpahl, Assigned: mscott)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11
Build Identifier: 1.5.0.10 (20070221)

Often I want to search for messages from a particular sender containing a particular piece of text. This could be very quick, since the message text only needs to be searched if the sender matches. However, such a search takes about as long as searching *all* message bodies for the text, which suggests that the text searching isn't being short-circuited if the sender doesn't match. It should be.
More generally speaking, the conditions should be evaluated from fastest to slowest, and for each message the evaluation should stop as soon as the result is known to be independent of the remaining conditions. (This is for both "all of the following" and "any of the following" conditions; in the former case, it can be determined early on that a message won't match, in the latter case, that it will.)


Reproducible: Always

Steps to Reproduce:
In a mail folder with lots of mails, Press CTRL-SHIFT-F, select "all of the following conditions", enter a condition for the sender and one for the message body, and press "Search".
Actual Results:  
slow

Expected Results:  
fast
Please try TB 2.0
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.