<DKIM> [PATCH 2/2] remove some rtime nonsense

Abdó Roig-Maranges abdo.roig at gmail.com
Fri Apr 3 21:01:52 BST 2015


> I blam the lack of proper OOP for making code so HARD to overview and
> understand. I want a messagelist class...

I strongly agree! A class CacheItem for cache entries shared across all folder
types would help in at least the following:

- unify maildir mtimes with IMAP internal dates. They would become a ".time"
  member, or something like this.

- We could move code (like mtime trickery, or label stuff) to
  FolderBase. As a byproduct utime_from_header would magically work on IMAP!

- we can use python __slots__ in CacheItem, and be more memory efficient in the
  cache. I don't have numbers... but we would no longer have a dictionary for
  every CacheItem instance, rather something similar to a C struct.

Do you plan in doing something like this at some point? Shall I put it in my
TODO list?



>> On the other hand, GmailMaildir does honor utime_from_header in savemessage,
>> because it just calls the parent savemessage.
>
> But the parent MaildirFolder().savemessage() do honor utime_from_header.

Yes, and GmailMaildirFolder().savemessage() calls the parent savemessage.


Abdó.




More information about the OfflineIMAP-project mailing list