You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Amichai Rothman (JIRA)" <se...@james.apache.org> on 2019/03/25 10:00:00 UTC

[jira] [Created] (JAMES-2698) MXHostAddressIterator performance

Amichai Rothman created JAMES-2698:
--------------------------------------

             Summary: MXHostAddressIterator performance
                 Key: JAMES-2698
                 URL: https://issues.apache.org/jira/browse/JAMES-2698
             Project: James Server
          Issue Type: Bug
          Components: DNSServer
    Affects Versions: 3.4.0
            Reporter: Amichai Rothman


In the old implementation (James 2.3.x) of iterating over the MX records and resolving their hosts, e.g. used by MailetContext.getSMTPHostAddresses(), it purposely did the lookups lazily, i.e. the hosts for each record were looked up only when it was reached by the iteration. The current implementation does all the lookups for all records up front and then returns them one by one.

I don't know if there was a reason for this change or if it was introduced by mistake, but it seems reasonable that since these hosts are used to try and send messages to the domain, and once it succeeds there is usually no need to continue the iteration, that the old behavior would be much more efficient and trigger many fewer DNS lookups on average.

If there is a good reason for the change, it should be documented in the iterator, otherwise please return the previous behavior.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org