6 ms·
> For example, if I archive an email, it takes 10 to 15 seconds for this to be reflected in the interface Have you tried changing local storage format from def
by magnat 4y ago
> For example, if I archive an email, it takes 10 to 15 seconds for this to be reflected in the interface
Have you tried changing local storage format from default mbox (one big linear file per folder) to maildir (each message in its own file)?
- winrid 4y agoThis is a great example of the kinds of problems they're trying to tackle. This shouldn't be an issue. Just use sqlite or similar.
- capitainenemo 4y agoAt least on Linux, I think the mbox vs maildir is an interoperability thing. I can access folders created by thunderbird, or existing user local ones in any local mail client or remotely through IMAP. It may be they don't want to break those external tools.
- derefr 4y agoSo have a checkbox for "also persist mailbox in an interoperable format", that then lets you choose mbox or maildir; where it's going to save the data for its own use in SQLite either way; only save in that "interoperable format" asynchronously in the background, and on quit (just like e.g. a Redis RDB file); and, if enabled, also scan the interoperable backing store for changes made on startup, to apply them to the internal, canonical store. FYI, iTunes.app (or whatever it's called now) for a long time had a legacy XML-file representation of the music library "for interoperability", that you could enable to be persisted to disk alongside its newer, binary DB file; when enabled, it worked exactly like this.
- capitainenemo 4y agoMaildir is fairly performant and Thunderbird does have its own index dbs for performance in mbox and maildir formats already. It's why the compact option exists for mbox since delete only removes the index key until you trigger a compact. Making the sqlite db the primary would mean that unless there was constant synchronisation I would be missing emails in the other clients. I feel like just switching to maildir across the board is a pretty good solution performance wise. Although, I do understand that folders with large numbers of files is a problem under Windows (many projects had to rework their design for this). So perhaps a sqlite solution for Windows would be a good idea.. or just a maildir with more nested folders to reduce size, linked to the thunderbird indexing.
- WorldMaker 4y agoModern NTFS doesn't have as much of a problem with folders full of files as its reputation states. Though File Explorer always still seems to make it seem slower/worse than it is. (Most of that is still things like populating thumbnail caches and stuff, though, more than actual disk performance.) The bigger issue with the Maildir standard on Windows is that the Maildir standard uses colons in filenames which is not allowed on Windows. (ETA: The obvious idea here to me would be to do something like a bare git repo as a Maildir-like with content-addressed storage.)
- capitainenemo 4y agoHm.. Not sure how modern that NTFS would have to be. Firefox and Minecraft had to do modifications to avoid the issue of slow file access and slow reads of folders full of small files. Hedgewars too. I feel these weren't the only cases. And none of those had anything to do with Explorer. But, it might have improved, and might be "good enough" for email.
- WorldMaker 4y agoSo much depends on the specific APIs, of course, and how many versions of Windows you are expecting to support, and what your seek patterns and locking expectations/behavior are. (In my experience, it has been misunderstandings of the Windows file lock model/ACL lookups that seem more often the problem than directory size, but obviously everyone's benchmarks are different. File locks are super "slow", especially if you are not opting out of locks you don't need.) I'm not suggesting that architecting with lots of small files in a single folder is yet the best architecture on Windows, just that for Maildir specifically on Windows it is among the least of the problems.
- capitainenemo 4y ago'k. take your word for it. Esp in relation to Maildir. I know very little about Windows development. But... just, FWIW, this particular subject has come up a lot on HN over the years with various explanations. https://news.ycombinator.com/item?id=18783525 https://news.ycombinator.com/item?id=18783525 and many many others easily searchable on hn.algolia.com My fav comment was by an MS dev: "NTFS code is a purple opium-fueled Victorian horror novel that uses global recursive locks and SEH for flow control."
- winrid 4y agoYou can asynchronously generate the mbox/maildir data.
- ruuda 4y agoThunderbird does store emails in SQLite databases.
- wankle 4y agoI want my email to stay in the same structure Thunderbird has now.
- ncphil 4y agoDamn. I _knew_ there was something I forgot to do setting up Tbird this time!
- kdtsh 4y agoMaildir support has been considered beta for a long time in Thunderbird, and using it for anything ‘critical’ doesn’t sound possible unless you like to live dangerously (for me, everything to do with email is critical- some messages are more important than others, but I really can’t deal with email being unstable, it’d be like the postal system being consistently unstable). Do you use the maildir format with Thunderbird? - if you have, how do you find it?
- magnat 4y agoI have been using maildir storage for a few years now, on 4 instances of Thunderbird, each with 10-50GB worth of messages per folder, on both NTFS and ext4. So far not a single case of lost message or usability issues. All operations are instant and don't block UI.
- xarope 4y agoI tried that before, blew out my storage (obviously since each small file now takes 4KiB block minimum in ext4, unless you specifically mkfs with a smaller block size or use zfs)