MailNews:Better Faster IMAP Plan

From MozillaWiki
Revision as of 23:25, 14 May 2008 by DavidA (talk | contribs) (New page: = Leverage Offline capabilities to make online more responsive = The basic idea is to use the offline capabilities of Thunderbird while online to make the UI more responsive, when operati...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Leverage Offline capabilities to make online more responsive

The basic idea is to use the offline capabilities of Thunderbird while online to make the UI more responsive, when operating on IMAP messages, out of the box, without the user having to tweak any settings.

UX Decisions to make

  • how do we transition existing users to the new model without causing pain?
  • The offline model will make "Unsent Items" more important -- should we promote it to a high-visibility UI element (like Mail.app's Outbox)?

Development Strategy

  • Consider implementing the below using a "proxy" to mediate between the UI and the IMAP protocol layer


Switch pref defaults

Switch the following defaults:

  • switch the default for imap folders so that they're configured for offline use out of the box. (code URL?)
  • switch mail.server.default.autosync_offline_stores to true, by default

Do UI operations in offline mode always

  1. change imap move/deletes though the UI so that they're done offline, and the offline operation is played back after the next message is displayed, or immediately if there's no next message to display.

Come up with a message header and message body download strategy

  • We probably want to download recent information before older information.

(The most succinct form of the command to fetch multiple messages (bodies or headers) fetches them in UID, roughly chronological order, using ranges, e.g., 1-20. But you certainly could fetch 20,19,18,17 etc. Are you talking about the new profile case, or the every day case? For the new profile case, a simple thing to do would be to fetch the bodies of the unread messages first, then the bodies of the read messages. Or we could fetch ranges of messages, but start at the end, not the top, e.g., 80-100, 60-79, etc. )

  • We should be careful about downloading automatically large message bodies, as they may block IMAP calls.

This would allow us to consider applying the same sort of logic to other protocols (NNTP?)

Come up with an offline operation playback strategy

  • May be worth implementing a few and seeing which ones work out best in practice.

Address consequences of preference changes

  • address growth of offline store folder - come up with a compacting strategy that is user-efficient. (once a week? once a month? Once a file reaches some % growth since the last compacting?)
  • Make sure that offline operations that fail give the user appropriate context as to the failure (offer to open up original message when sends fail, etc.)

NB: At this point, the system should be releasable

Consider further enhancements

  • Thunderbird should use the new platform code to detect whether there is a net connection or not, and 1) display that status to the user somehow, and 2) use the status to determine when to replay offline operations.
  • We could use the Idle service to download message bodies when the user is idle.
  • We could breakup the download of message bodies into multiple passes, which would allow the user to sneak in and start reading messages before we've synced the whole folder.
  • We could compact offline stores when the user is idle.
  • We could playback offline operations when the user is idle, though I think we'd run into less issues if we tried to do the offline playback closer to the UI event.


Pending issues

  • What UI do we present to allow users to override the auto-download of all message bodies? Is it per folder? Per account? Global?
  • Do we give the user feedback when the delete actually happens? (davida: IMO no, only when delete fails)
  • Do we make the Trash an offline folder like all other folders? (davida: Why not?)
  • Are there other imap operations that we would want to do "offline", like renaming a folder, or should we stick with the most often used commands, like reading a message, move, delete, SMTP send, etc?