1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 7. Performance tuning</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="index.html" title="The Mutt E-Mail Client" /><link rel="up" href="index.html" title="The Mutt E-Mail Client" /><link rel="prev" href="optionalfeatures.html" title="Chapter 6. Optional features" /><link rel="next" href="reference.html" title="Chapter 8. Reference" /><style xmlns="" type="text/css">
4 body { margin-left:2%; margin-right:2%; font-family:serif; }
5 .toc, .list-of-tables, .list-of-examples { font-family:sans-serif; }
6 h1, h2, h3, h4, h5, h6 { font-family:sans-serif; }
7 em.replaceable code { font-family:sans-serif; }
8 p { text-align:justify; }
9 div.table p.title, div.example p.title { font-size:smaller; font-family:sans-serif; }
10 .email, .email a { font-family:monospace; }
11 div.table-contents table { border-collapse:collapse; border:1px solid #c0c0c0; }
12 div.table-contents table td, div.table-contents table th { padding:5px; text-align:left; }
13 div.table-contents table th {
14 font-family:sans-serif;
19 pre.screen, div.note { background:#f0f0f0; border:1px solid #c0c0c0; padding:5px; }
20 div.note h3 { font-size:small; font-style:italic; font-variant: small-caps; }
21 div.note h3:after { content: ":" }
22 div.note { margin-bottom: 5px; }
24 </style></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 7. Performance tuning</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="optionalfeatures.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="reference.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="tuning"></a>Chapter 7. Performance tuning</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="tuning.html#tuning-mailboxes">1. Reading and writing mailboxes</a></span></dt><dt><span class="sect1"><a href="tuning.html#tuning-messages">2. Reading messages from remote folders</a></span></dt><dt><span class="sect1"><a href="tuning.html#tuning-search">3. Searching and limiting</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="tuning-mailboxes"></a>1. Reading and writing mailboxes</h2></div></div></div><p>
25 Mutt's performance when reading mailboxes can be improved in two ways:
26 </p><div class="orderedlist"><ol type="1"><li><p>
27 For remote folders (IMAP and POP) as well as folders using
28 one-file-per message storage (Maildir and MH), mutt's
29 performance can be greatly improved using
30 <a class="link" href="optionalfeatures.html#header-caching" title="7.1. Header caching">header caching</a>.
31 Using a single database per folder may further increase
34 Mutt provides the <a class="link" href="reference.html#read-inc" title="3.235. read_inc">$read_inc</a>
35 and <a class="link" href="reference.html#write-inc" title="3.305. write_inc">$write_inc</a>
36 variables to specify at which rate to update progress
37 counters. If these values are too low, mutt may spend more
38 time on updating the progress counter than it spends on
39 actually reading/writing folders.
41 For example, when opening a maildir folder with a few
42 thousand messages, the default value for
43 <a class="link" href="reference.html#read-inc" title="3.235. read_inc">$read_inc</a>
44 may be too low. It can be tuned on on a folder-basis using
45 <a class="link" href="configuration.html#folder-hook" title="7. Setting variables based upon mailbox">folder-hooks</a>:
46 </p><pre class="screen">
47 # use very high $read_inc to speed up reading hcache'd maildirs
48 folder-hook . 'set read_inc=1000'
49 # use lower value for reading slower remote IMAP folders
50 folder-hook ^imap 'set read_inc=100'
51 # use even lower value for reading even slower remote POP folders
52 folder-hook ^pop 'set read_inc=1'</pre></li></ol></div><p>These settings work on a per-message basis. However, as messages may
53 greatly differ in size and certain operations are much faster than others,
54 even per-folder settings of the increment variables may not be
55 desirable as they produce either too few or too much progress updates.
56 Thus, Mutt allows to limit the number of progress updates per second it'll
57 actually send to the terminal using the
58 <a class="link" href="reference.html#time-inc" title="3.286. time_inc">$time_inc</a> variable.</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="tuning-messages"></a>2. Reading messages from remote folders</h2></div></div></div><p>
59 Reading messages from remote folders such as IMAP an POP can be
60 slow especially for large mailboxes since mutt only caches a very
61 limited number of recently viewed messages (usually 10) per
62 session (so that it will be gone for the next session.)
64 To improve performance and permanently cache whole messages,
65 please refer to mutt's so-called
66 <a class="link" href="optionalfeatures.html#body-caching" title="7.2. Body caching">body caching</a> for details.
67 </p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="tuning-search"></a>3. Searching and limiting</h2></div></div></div><p>
68 When searching mailboxes either via a search or a limit action, for
69 some patterns mutt distinguishes between regular expression and string
70 searches. For regular expressions, patterns are prefixed with
71 “<span class="quote">˜</span>” and with “<span class="quote">=</span>” for string searches.
73 Even though a regular expression search is fast, it's several times
74 slower than a pure string search which is noticeable especially on large
75 folders. As a consequence, a string search should be used instead of a
76 regular expression search if the user already knows enough about the
79 For example, when limiting a large folder to all messages sent to or by
80 an author, it's much faster to search for the initial part of an e-mail
81 address via <code class="literal">=Luser@</code> instead of
82 <code class="literal">˜Luser@</code>. This is especially true for searching
83 message bodies since a larger amount of input has to be searched.
85 Please note that string search is an exact case-sensitive search
86 while a regular expression search with only lower-case letters performs
87 a case-insensitive search.
88 </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="optionalfeatures.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="reference.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 6. Optional features </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 8. Reference</td></tr></table></div></body></html>