From 0490023baf192d3dc8a05762487fce3439b27ed7 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 15 Sep 2010 20:17:29 +0300 Subject: [PATCH] * mu-cmd-index: print indexing updates only once 25, this reduces printing overhead (of course, --quiet is still faster) --- src/mu-cmd-index.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mu-cmd-index.c b/src/mu-cmd-index.c index 91dcb48f..c8ec3dc6 100644 --- a/src/mu-cmd-index.c +++ b/src/mu-cmd-index.c @@ -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);