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
this is a very self-contained issue, and all js, and fairly simple.
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 on attachment 576828 [details] [diff] [review] 665142#1.patch great job, Jason, yes this fixes the issue.