From f525c54356f2f6a0433f89f36c58e25c9f72e91a Mon Sep 17 00:00:00 2001 From: djcb Date: Tue, 25 Dec 2012 18:49:14 +0200 Subject: [PATCH] * mu-msg-iter.cc: get /all/ matches on the first go, thread those, then return maxnum in situations where the number of matches is significantly greater than maxnum, results are much better this way. --- lib/mu-msg-iter.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/mu-msg-iter.cc b/lib/mu-msg-iter.cc index 530d3004..9b365ba5 100644 --- a/lib/mu-msg-iter.cc +++ b/lib/mu-msg-iter.cc @@ -66,7 +66,9 @@ public: // set _skip_dups to false, so we'll calculate threadinfo // for all, and then skip some after sorting _skip_dups = false; - _matches = _enq.get_mset (0, maxnum); + // first, we get _all_ matches (G_MAXINT), based the threads + // on that, then return of those + _matches = _enq.get_mset (0, G_MAXINT); _matches.fetch(); _skip_dups = false;