This caters for the cases where the ioloop times is not actively refreshed
inside the processing loops (sort command, index search_next())
normalizer_func_t *normalizer;
struct timeval search_start_time, last_notify;
+ unsigned int search_notify_passes;
/* if non-NULL, specifies that a search resulting is being updated.
this can be used as a search optimization: if searched message
ctx->last_notify = ctx->search_start_time;
if (box->storage->callbacks.notify_progress == NULL ||
- ctx->progress_hidden ||
- ioloop_time - ctx->last_notify.tv_sec < MAIL_STORAGE_NOTIFY_INTERVAL_SECS)
+ ctx->progress_hidden)
+ return;
+
+ if (++ctx->search_notify_passes % 1024 == 0)
+ io_loop_time_refresh();
+
+ if (ioloop_time - ctx->last_notify.tv_sec < MAIL_STORAGE_NOTIFY_INTERVAL_SECS)
return;
struct mail_storage_progress_details dtl = {