Last Comment Bug 665142 - mark read by date should use a filter enumerator
: mark read by date should use a filter enumerator
Status: RESOLVED FIXED
[good first bug]
: helpwanted
Product: Thunderbird
Classification: Client Software
Component: Folder and Message Lists (show other bugs)
: unspecified
: x86 Windows 7
: -- normal (vote)
: Thunderbird 11.0
Assigned To: Jason Yeo[:jyeo]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-17 14:26 PDT by David :Bienvenu
Modified: 2011-12-16 14:38 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
665142#1.patch (2.80 KB, patch)
2011-11-24 14:43 PST, Jason Yeo[:jyeo]
mozilla: review+
Details | Diff | Review

Description David :Bienvenu 2011-06-17 14:26:51 PDT
Currently, the code that marks read by date iterates over all the headers in the db, from js, and checks each header to see if its date falls in the date range. 

http://mxr.mozilla.org/comm-central/source/mailnews/base/content/markByDate.js#124

It should use a filter enumerator with the date check in the enumerator, e.g., http://mxr.mozilla.org/comm-central/source/mailnews/db/msgdb/test/unit/test_filter_enumerator.js#52

This could massively cut down on the crossing of the js c++ boundary
Comment 1 David :Bienvenu 2011-06-17 14:34:24 PDT
this is a very self-contained issue, and all js, and fairly simple.
Comment 2 Jason Yeo[:jyeo] 2011-11-24 14:43:59 PST
Created attachment 576828 [details] [diff] [review]
665142#1.patch

I'm not sure if this solves the problem of minimizing the crossing over of js to c++. Please take a look and let me know the changes needed.
Comment 3 David :Bienvenu 2011-12-13 12:12:01 PST
Comment on attachment 576828 [details] [diff] [review]
665142#1.patch

great job, Jason, yes this fixes the issue.
Comment 4 Mark Banner (:standard8) 2011-12-16 14:38:59 PST
Checked in: http://hg.mozilla.org/comm-central/rev/b7656cc4ed04

Note You need to log in before you can comment on or make changes to this bug.