Hi, On Thu, Jan 26, 2017 at 11:03:19AM -0800, Will Yardley wrote: > On Thu, Jan 26, 2017 at 10:40:37AM -0800, Kevin J. McCarthy wrote: > > On Thu, Jan 26, 2017 at 06:42:10PM +0100, Fabian Groffen wrote: > > > Please find attached a patch against current Mutt tip to add LMDB > > > backend support. I must stress that this patch wasn't written by > > > me, I've made sure it applies to current Mutt and works correctly.
Thanks for finishing this up. I originally did some optimizations that can be seen in https://dev.mutt.org/trac/ticket/3691 and got this work into neomutt so it would see some initial testing, but haven't had the time and energy to get it submitted here over what was already in the ticket. Two minor issues: - You may want to set LMDB_DB_SIZE to a larger value, see https://github.com/neomutt/neomutt/issues/267 - There's a missing free(&ctx) in hcache_lmdb_open() when mdb_env_create() fails. > > > The performance aspect of LMDB over BerkelyDB is significant, and > > > in the light of licence aspects LMDB gets preferred by some > > > distros these days. FWIW, the patch is part of Mutt on Gentoo. Here are some measurements in case it helps: https://github.com/neomutt/neomutt/issues/244#issuecomment-274349073 > As discussed a while back, maybe we should also see if someone's > willing to propose a patch to add Kyoto Cabinet support and possibly > to remove / deprecate Tokyo Cabinet support? I did this work a while ago. It's in neomutt at https://github.com/neomutt/neomutt/blob/neomutt/hcache-kc.c now, but this won't apply as-is because neomutt now has separate files per header cache backend. My original patch before the backends were split into separate files is https://github.com/neomutt/neomutt/commit/944435025d5939aa7c568e54a9a1a9b2e8e09c1a If somebody has some time to make that apply in mutt, that would be great. HTH, -- Clemens
