[Dovecot] Apple patch 10

Timo Sirainen tss at iki.fi
Wed Jan 7 07:01:37 EET 2009


On Jan 6, 2009, at 6:51 PM, Mike Abbott wrote:

>>> - The logging tag for a persistent mail process is just "*"  
>>> instead of
>>> the user name
>> Couldn't this also be done the same way as environment switching?
>
> No because the master process adds the tag, not the mail process.

Ah, right. But that could be changed. I think login process also does  
that, or at least I've thought that at some point it should do that.  
So that with process_per_connection=yes the prefix can't be changed  
but with =no it could be empty and the child process could set it at  
will.

>> mail-processes.c:mail_connections
>> should probably be an array instead of a hash table.
>
> Sure, either way.  The hash table affords quick lookups when  
> mail_max_connections is large, but scanning an array for an int is  
> fast too.

But the current code looks like it finds the first free connection_id  
in any case, which can basically be thought of as the first available  
connection index number. And that's somewhat faster to find in array  
than in hash. And lookup for the index number is also at least as fast  
in array. So I don't really see any advantages for hash here.


More information about the dovecot mailing list