<<< Date Index >>>     <<< Thread Index >>>

[HCACHE] Profiling maildir/open with mutt-1.5.7 + maildir-hc



Hello,
I just profiled mutt to track down a header cache maildir related
problem of a MAC user (150T cached messages take 8 minutes to open).

However I spotted the following during my testing:

# Opening a full cached maildir box with 30T messages.
sithglan@faui00u:~/work/mutt/mutt-hc-1.5.7-mac$ ./mutt -f ~/Maildir/.lists.uml 
-e 'exec exit'

Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
 13.33      0.04     0.04        2    20.00    25.00  maildir_sort_inode
 10.00      0.07     0.03    30326     0.00     0.00  safe_strcat
  6.67      0.09     0.02   242608     0.00     0.00  rfc822_free_address
  6.67      0.11     0.02   151962     0.00     0.00  safe_calloc
  6.67      0.13     0.02        2    10.00    62.74  maildir_delayed_parsing
  6.67      0.15     0.02                             compare_date_sent
  3.33      0.16     0.01  1148542     0.00     0.00  safe_free
  3.33      0.17     0.01   532077     0.00     0.00  restore_char
  3.33      0.18     0.01   450631     0.00     0.00  safe_malloc
  3.33      0.19     0.01   325622     0.00     0.00  ascii_tolower
  3.33      0.20     0.01    60665     0.00     0.00  mutt_strncmp
  3.33      0.21     0.01    60652     0.00     0.00  mutt_free_body
  3.33      0.22     0.01    30326     0.00     0.00  maildir_parse_entry
  3.33      0.23     0.01    30326     0.00     0.00  mutt_hcache_fetch
  3.33      0.24     0.01    30326     0.00     0.00  restore_parameter
  3.33      0.25     0.01    30325     0.00     0.00  maildir_merge_inode
  3.33      0.26     0.01        2     5.00    14.88  maildir_add_to_context
  3.33      0.27     0.01        1    10.00    10.00  mutt_clear_threads
  3.33      0.28     0.01        1    10.00    10.00  mutt_sort_headers
  3.33      0.29     0.01        1    10.00    19.77  mx_update_context
  3.33      0.30     0.01                             dump_char_size
  0.00      0.30     0.00  1051814     0.00     0.00  restore_int
...

However as you can see maildir_sort_inode and its children take 16% of the
whole process. So people who use maildir header caching should turn off maildir
sort inode using:

        ./configure --disable-inodesort ...

Greetings,
        Thomas