git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Query: Patches break with Microsoft exchange server.

From
David Woodhouse <dwmw2@infradead.org>
Date
Aug 11, 2010, 16:30 UTC
Message-ID
<1281544234.5107.25.camel@localhost>
In-Reply-To
<AANLkTi=9xVdfXJXpkNPUMahc7AsbxjVbZFSxeBrzvbmS@mail.gmail.com>
On Wed, 2010-08-11 at 12:18 -0400, Avery Pennarun wrote:
Show 6 quoted lines
> 
> Out of curiosity, why fall back to one chunk at a time?  It seems to
> me that IMAP should be able to still support multiple outstanding
> requests in that case, but you'd just get errors on the latter chunks.
> 
> It is just that there was no point optimizing the workaround case?
There wasn't a lot of point in optimising it.

The current logic, shown in the patch I referenced, is to keep fetching new chunks while the stream position matches the end of the previous chunk we attempted to fetch.

To handle multiple outstanding requests, especially if they can be satisfied out-of-order, would have been more complex because the stream position (in the 'really_fetched' variable) wouldn't necessarily match anything interesting. We'd have to keep more state, and the whole thing would get a lot more intrusive.

Also, for the common case where the server isn't broken and the mail size happens not to fall on a chunk boundary, the current implementation results in no extra fetch requests. Doing otherwise would either mean extra fetch requests even for this common case, or would mean even more complexity to 'catch up' by issuing additional fetch requests as soon as we realise the server lied about RFC822.SIZE (which is when we receive the last chunk, and it runs over the size we expected).

It may be that there's a neat and simple way to handle all of the above, and if so then patches would be welcome -- but personally, I just couldn't be bothered to think too hard about it. There were more pressing matters to attend to, like implementing QRESYNC support.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation
Previous: Avery PennarunNext: Avery Pennarun
Message 7 of 9 in “Re: Query: Patches break with Microsoft exchange server.”
  1. Felipe ContrerasAug 10, 2010
  2. viresh kumarAug 11, 2010
  3. Jeffrey HundstadAug 11, 2010
  4. David WoodhouseAug 11, 2010
  5. Jeffrey HundstadAug 11, 2010
  6. Avery PennarunAug 11, 2010
  7. David WoodhouseAug 11, 2010
  8. Avery PennarunAug 11, 2010
  9. viresh kumarAug 12, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.