quentinsf/IMAPdedup — pull request #8 by bjorn (2014-02-16 22:11:08+00:00)
Title: Batch header requests to speed up the process

Running time on about 6000 messages went from 11 minutes to 18 seconds by batching per 100 messages.

When requesting all headers at the same time the duration was 11 seconds, so reducing the size of the batches further seems to not be worth the reduction in user feedback.

When merging this, please double-check that the method I used to match the headers up with the message indexes is correct. In particular these two lines:

mnum = msgnums_in_chunk[ci]
mp = p.parsestr(ms[ci * 2][1])