Slow startup and execution time on macOS

Issue

Runtime configurations use the local address localhost in many locations. On macOS, an instance of xDI Runtime that references localhost may sometimes take a long time to start or to execute sessions. You may wait upwards of a minute in some cases.

Explanation

The Java Virtual Machine that xDI Runtime uses needs to look up local addresses such as localhost. On macOS, looking up local addresses may be slower than on other platforms.

Solution

To resolve this issue, you can manually add your macOS hostname to the system hosts file. This step forces macOS to use the manual information without doing another lookup, which is much faster.

  1. Use macOS system tools to find your computer’s local hostname.

  2. Using the terminal or another filesystem tool, navigate to the /etc/ system directory.

  3. Open the /etc/hosts file, and add the following lines:

    127.0.0.1   localhost <yourMacHostname>
    ::1         localhost <yourMacHostname>
  4. Replace <yourMacHostname> with your computer’s local hostname.

  5. Save the file.