]> Sergey Matveev's repositories - public-inbox.git/commit
inboxidle: avoid needless syscalls on refresh
authorEric Wong <e@80x24.org>
Sat, 26 Dec 2020 09:34:39 +0000 (09:34 +0000)
committerEric Wong <e@80x24.org>
Sat, 26 Dec 2020 20:20:13 +0000 (20:20 +0000)
commit933fce93167eba8645e637c363561575db9f9420
treef871ec5283e0b3d1db5456b6bbe3a87d6e5fe1f7
parenta0b470cbaf01c699e008818ff0f137d24b1959b1
inboxidle: avoid needless syscalls on refresh

We don't have to replace a bunch of existing watches
with identical new ones.  On Linux with Linux::Inotify2
installed, this avoids a storm of inotify_add_watch(2)
and inotify_rm_watch(2) syscalls on SIGHUP with -imapd
and "-extindex --watch"

(cherry picked from commit 10bf54305da8422d9ece6b809996092c1c4b1786)

Note: this seems to fix missed wakeups with many watches,
so it's in the stable branch.

Link: https://public-inbox.org/meta/20201226201115.GA30142@dcvr/
lib/PublicInbox/InboxIdle.pm
t/imapd.t