💾 Archived View for bvnf.space › blog › 005_speed_up_neomutt.gmi captured on 2023-07-22 at 16:20:25. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-04-28)

-=-=-=-=-=-=-

Speed up Neomutt

I use isync to download all my email, and Neomutt works on the local mboxes rather than doing IMAP and co, so it's pretty fast. However, Neomutt has been consistently slow to start up - there's roughly a 2 second delay between running the command, and seeing the ncurses interface starting. I asked flatcap (the author) about this in IRC, and he suggested saving a debug log:

$ neomutt -d6
Debugging at level 6 to file '/home/ben/.neomuttdebug0'

flatcap suspected it could be a hostname lookup causing the delay, and sure enough:

[2022-01-07 00:32:48]<1> get_hostname() Setting $hostname
[2022-01-07 00:32:48]<3> mutt_getaddrinfo() before getaddrinfo
[2022-01-07 00:32:50]<3> mutt_getaddrinfo() after getaddrinfo
[2022-01-07 00:32:50]<1> get_hostname() Hostname: t480

getaddrinfo() is taking up 2 seconds by itself! And it's wasted time, because the hostname (t480) is just what I put in /etc/hostname. So, to prevent this time-waster, I just added this line to my Neomutt config:

set hostname = t480

and voila, now it starts up in an instant. Thanks flatcap!

While I've got your attention, you can also add a header to announce your XMPP contact address:

my_hdr Jabber-ID: ben@bvnf.space
unignore Jabber-ID

RFC7259: The Jabber-ID Header Field

--

written 2022-01-07

home

blog home