On Mon, Jun 08, 2009 at 03:15:22PM -0400, Wietse Venema wrote:
> > Mind you, the expected number of transports for a message is I think
> > reasonably small.
>
> I see one hash table that is indexed by the queue ID, so this
> would involve one hash-table lookup per transport:
Not sure what "this" is referring to above.
>
> for each transport
> if (htable_find(transport->job_byname, queue_id)
> skip this message as a duplicate.
Typically, the caller knows the transport, and is looking for the
corresponding job, so the there is no loop. I was suggesting
that the transport hash is not necessary, the job can be found via:
for (job = message->job_list->next; job; job = job->peers.next)
if (job->transport == transport)
return job;
This way, there is no hash table at all, and performance is just fine,
because messages don't have a large number of jobs.
--
Viktor.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[email protected]?body=unsubscribe%20postfix-users>
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.