* mu-cmd-index: print indexing updates only once 25, this reduces printing

overhead (of course, --quiet is still faster)
This commit is contained in:
Dirk-Jan C. Binnema 2010-09-15 20:17:29 +03:00
parent e3599d4d4f
commit 0490023baf
1 changed files with 4 additions and 1 deletions

View File

@ -121,6 +121,9 @@ index_msg_cb (MuIndexStats* stats, void *user_data)
if (MU_CAUGHT_SIGNAL)
return MU_STOP;
if (stats->_processed % 25)
return MU_OK;
while (len --> 0) /* note the --> operator :-) */
g_print ("\b");
@ -128,7 +131,7 @@ index_msg_cb (MuIndexStats* stats, void *user_data)
len = snprintf (output, sizeof(output),
"%c processing mail; processed: %u; "
"updated/new: %u, cleaned-up: %u",
(unsigned)kars[(++i/500) % 4],
(unsigned)kars[++i % 4],
(unsigned)stats->_processed,
(unsigned)stats->_updated,
(unsigned)stats->_cleaned_up);