changeset: 6898:4f0a84b954ef user: Kevin McCarthy <ke...@8t8.us> date: Wed Jan 04 19:45:59 2017 -0800 link: http://dev.mutt.org/hg/mutt/rev/4f0a84b954ef
Fix imap server-side search to call uid2msgno() only once. (see #3905) After performing a UID SEARCH, the results are parsed in cmd_parse_search(). This was accidentally calling uid2msgno() twice. Since that function does a linear search, this has a noticable impact on large search results. diffs (12 lines): diff -r 23b02a482bde -r 4f0a84b954ef imap/command.c --- a/imap/command.c Mon Jan 02 18:08:17 2017 -0800 +++ b/imap/command.c Wed Jan 04 19:45:59 2017 -0800 @@ -884,7 +884,7 @@ msgno = uid2msgno (idata, uid); if (msgno >= 0) - idata->ctx->hdrs[uid2msgno (idata, uid)]->matched = 1; + idata->ctx->hdrs[msgno]->matched = 1; } }