mozilla-b2g/gaia-email-libs-and-more — pull request #190 by jrburke (2013-04-29 03:15:29+00:00)
Title: Bug 864414: Use recvCache to speed up startup, use main-frame-setup front end

Introduces a cache of messages from back end, stored in a cookie to speed up initial render. With this change:

* Uses cookie space to store it. Max space per cookie is a little over 4000, but allow for double byte characters. Also, using encodeURIComponent to avoid delimiter problems in cookie, so ends up taking a few cookies to hold the whole message. The message is partitioned across a few cookies to get all the storage.
* The cache is 0-indexed account splice's item, and first inbox folder, and then 8 header items from the top of the folder.
* Removes hasAccounts previous hasAccount cookie in favor of this new cache, since the front end will load main-frame-setup and get a real MailAPI object, which is now global.
* Removes extra files from being loaded for back end on main thread, now just main-frame-setup.