Today tinymail not only uses less than 4 MB RAM for viewing large e-mail folders, it’s also becoming blazing fast and it’s getting the minimum features a small e-mail client needs. The big missing feature for being alpha-release-ready is creating e-mails (and sending using a transport camel provider).
After some attempts to remove the allocation peek, I squeezed it with a megabyte by more quickly unreferencing the camelfolder instances. Peeks aren’t interesting because they require the hardware builder to nevertheless add memory to the device. It’s good that memory doesn’t stay allocated, but simply not needing the memory yet being fast enough is of course better. I’m never satisfied! Now tinymail is actually faster yet its folder-load allocation peek is lower. Win-win.
Some guys on IRC want me to build an ncurses version of tinymail, using libtinymail. They are, of course, invited to start. I’d certainly join. The libtinymail and libtinymail-camel libraries don’t depend on any GUI thing.
API boutification
- Refactored some things from the application implementation to the libtinymailui.
- The header-list model no longer has an add_header nor inject_headers method. Now it simply has a set_folder method.
Performance tweaking
- Header-list model: Caching the total length of a folder replaces a g_list_length on the header glist.
- Folder type: Caching the priv pointer of the folder type in the loop over each message header, makes the slower gobject get_private stuff happen less often.
- Folder and message header types: Not duplicating the uid of the messages, but keeping the gptrarray until the folder must finalize itself, letting the message header instances have their uid point to the string instances in the gptrarray.
- Message header type: Removed the priv pointer of the header proxy type. Made the entire type opaque (forward typedef). This makes the slower gobject get_private stuff not happen for this type anymore.
New features
- Completed the mime-part type. It now as properties like filename, mime-type and others.
- Added a attachment viewer in the message window, added an attachment list model type that will set the mime-type icon correctly. Since that uses a tiny gnome api I had to let libtinymailui depend on libgnomeui-2 (but this can very easily be changed of course)