Incremental message loading

I recently had the chance to do another marathon coding week of LogicMail development. These rare opportunities allow me to make real progress, instead of just incremental fixes and features. While the majority of the work was deep in the guts of the application, the actual user impact should be quite welcome.

To sum things up, I managed to accomplish the following:

  • Complete rewrite of the folder message cache (#213)
    • This is where I store message headers (not contents) so refreshing your view of a mailbox is faster than re-fetching everything from the server.
    • I now use the device's internal persistent store for this, instead of the filesystem. (which will eventually make filesystem-less operation possible, for #167 and #232)
    • This cache can be intentionally wiped with a "Clear" button at the bottom of the main configuration screen.
  • Complete rewrite of the code that refreshes mailbox contents and reconciles with the cache, when the user clicks on a mailbox
    • Makes this behavior far less messy and far more error-tolerant, allowing improvements in the future.
    • Keeps cache better synchronized with the server (#209)
  • Implementation of a new "Load more messages..." feature, for incremental mailbox loading
    • The message list on the mailbox screen now shows a special "Load more messages..." item whenever there's a gap at which more messages can be loaded.
    • If your mailbox has messages which are not ordered by date on the server, this item might appear in weird places.
    • This now adds three new configuration options to the advanced account settings:
      • "Messages to load" - How many messages to load/update at the front of a mailbox, when the user selects it. (the equivalent of the old global messages-to-load option)
      • "Load increment" - How many more messages to load when the user clicks on the new "Load more messages..." item on the mailbox screen
      • "Messages to retain" - How many messages (total) to keep in the local cache (and reconcile with the server) if they've already been loaded.
    • Feel free to offer suggestions for better naming
  • Opening a POP message now marks it as opened in the local cache.
    • POP servers don't store flags, so this should be a welcome feature
    • Eventually I'll probably implement fake support for other flags on POP accounts this way

And now for the few screenshots I can share:

  • Posted: 2010-10-24 13:38
  • Categories: (none)



No comments.