Mercurial > dovecot > core-2.2
comparison src/lib-storage/list/mailbox-list-index-notify.c @ 22454:725057ef25e4
lib-storage: Optimize INBOX notifications with mailbox_list_index_include_inbox=yes
There's no need for special INBOX checks in that case, because INBOX is
tracked in the mailbox list index the same as any other mailbox.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 04 Sep 2017 16:55:30 +0300 |
parents | c5eae96dcd71 |
children | 056a93bfc669 |
comparison
equal
deleted
inserted
replaced
22453:6eb5a6930614 | 22454:725057ef25e4 |
---|---|
99 (void)mailbox_list_iter_subscriptions_refresh(list); | 99 (void)mailbox_list_iter_subscriptions_refresh(list); |
100 mailbox_tree_sort(list->subscriptions); | 100 mailbox_tree_sort(list->subscriptions); |
101 inotify->subscriptions = mailbox_tree_dup(list->subscriptions); | 101 inotify->subscriptions = mailbox_tree_dup(list->subscriptions); |
102 } | 102 } |
103 inotify->list_log_path = i_strdup(ilist->index->log->filepath); | 103 inotify->list_log_path = i_strdup(ilist->index->log->filepath); |
104 if ((list->ns->flags & NAMESPACE_FLAG_INBOX_ANY) != 0 && | 104 if (list->mail_set->mailbox_list_index_include_inbox) { |
105 mailbox_list_get_path(list, "INBOX", MAILBOX_LIST_PATH_TYPE_INDEX, | 105 /* INBOX can be handled also using mailbox list index */ |
106 &index_dir) > 0) { | 106 } else if ((list->ns->flags & NAMESPACE_FLAG_INBOX_ANY) == 0) { |
107 /* no INBOX in this namespace */ | |
108 } else if (mailbox_list_get_path(list, "INBOX", MAILBOX_LIST_PATH_TYPE_INDEX, | |
109 &index_dir) <= 0) { | |
110 /* no indexes for INBOX? can't handle it */ | |
111 } else { | |
107 /* FIXME: annoyingly hardcoded filename. */ | 112 /* FIXME: annoyingly hardcoded filename. */ |
108 inotify->inbox_log_path = i_strdup_printf( | 113 inotify->inbox_log_path = i_strdup_printf( |
109 "%s/"MAIL_INDEX_PREFIX".log", index_dir); | 114 "%s/"MAIL_INDEX_PREFIX".log", index_dir); |
110 } | 115 } |
111 | 116 |