Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-2698

MXHostAddressIterator performance

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.4.0
    • Fix Version/s: None
    • Component/s: DNSServer
    • Labels:
      None

      Description

      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.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              amichai Amichai Rothman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: