This commit removes hardcoded 500 ms debounce
from storage that delays all storage notification subscribers
such as IDLE and NOTIFY commands.
500 ms debounce constant NOTIFY_DELAY_MSECS
was added in 2009 [1]. Before that Dovecot
was only delivering notifications
when a second-resolution timer
is changed by at least 1, so IDLE notifications
were delayed by half a second on average.
[1] https://github.com/dovecot/core/commit/56fb5d09955b6097f77b341717fd9b70e9f13...
---
src/lib-storage/mail-storage-private.h | 2 +-
src/lib-storage/mailbox-watch.c | 21 ++++-----------------
2 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/src/lib-storage/mail-storage-private.h b/src/lib-storage/mail-storage-private.h
index 0cbdf4c48a..32b337d242 100644
--- a/src/lib-storage/mail-storage-private.h
+++ b/src/lib-storage/mail-storage-private.h
@@ -455,7 +455,7 @@ struct mailbox {
/* Mailbox notification settings: */
mailbox_notify_callback_t *notify_callback;
void *notify_context;
- struct timeout *to_notify, *to_notify_delay;
+ struct timeout *to_notify;
struct mailbox_notify_file *notify_files;
/* Increased by one for each new struct mailbox. */
diff --git a/src/lib-storage/mailbox-watch.c b/src/lib-storage/mailbox-watch.c
index 659cab3810..a56c5093fc 100644
--- a/src/lib-storage/mailbox-watch.c
+++ b/src/lib-storage/mailbox-watch.c
@@ -9,8 +9,6 @@
#include