[Dovecot] Redundant timers
Hello.
I am on an irrational crusade against unneeded timers (it started as a well-meaining power saving exercise), and I have now started removing polling in Dovecot.
Attached is a patch with the work I did on this the other night. Would something like that be acceptable, or should I make it in a different way?
There seems to be no one-shot timer support, right?
Is there a Dovecot coding style document? (I did notice that there appears to be an 80 char width that I exceeded)
Cheers, Anders
On Tue, 2008-01-01 at 23:52 +0100, Anders wrote:
Attached is a patch with the work I did on this the other night. Would something like that be acceptable, or should I make it in a different way?
v1.0 will stay as it is, but something like this could still be done for v1.1.
I just changed today auth failure handling code to drop the timeout when there are no failed requests (http://hg.dovecot.org/dovecot/rev/958500009336).
As for the setup_timeout() thing, I think most of that logic should be in src/lib/. Instead of having one idle timeout, add a struct timeout to all clients and add a new timeout_reset() API to reset it whenever receiving input. The current timeout handling code is a bit inefficient with lots of timers though, so that probably needs a redesign as well.
There seems to be no one-shot timer support, right?
Right. There hasn't really been a need for it.
Is there a Dovecot coding style document? (I did notice that there appears to be an 80 char width that I exceeded)
I should write one some day, but I think it's pretty close to Linux kernel's coding style. And yes, there's a 80 char width limit.
On Wed, 2008-01-02 at 02:24 +0200, Timo Sirainen wrote:
As for the setup_timeout() thing, I think most of that logic should be in src/lib/. Instead of having one idle timeout, add a struct timeout to all clients and add a new timeout_reset() API to reset it whenever receiving input. The current timeout handling code is a bit inefficient with lots of timers though, so that probably needs a redesign as well.
A lot of this is now done in v1.1 code tree. auth and master processes could still use some timeout fixing though.
Timo Sirainen wrote:
A lot of this is now done in v1.1 code tree. auth and master processes could still use some timeout fixing though.
Hi.
It seems that index-mailbox-check.c is still running a timer every second, is there any way to get rid of that?
Regards, Anders.
On Mon, 2008-02-25 at 18:35 +0100, Anders wrote:
Timo Sirainen wrote:
A lot of this is now done in v1.1 code tree. auth and master processes could still use some timeout fixing though.
Hi.
It seems that index-mailbox-check.c is still running a timer every second, is there any way to get rid of that?
Committed a few changes to get rid of it. Or it still triggers every mailbox_idle_check_interval seconds.
participants (2)
-
Anders
-
Timo Sirainen