cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugi Thordarson <h...@karlmenn.is>
Subject Experiencing occasional Cayenne-slowness on Sierra or High Sierra? Might want to read this.
Date Mon, 27 Nov 2017 12:37:01 GMT
Hi all.
Just a quick service notification: I recently noticed my unit tests were running rather slowly,
due to weird occasional 8 second breaks.

Turns out that something changed in Sierra regarding how it handles host name lookups (although
weirdly enough, this was only exposed in High Sierra for me) making the invocation of java.net.InetAddress.getLocalHost()
extremely slow. And Cayenne uses that method in IDUtil to get the machine's IP address for
generation of random IDs.

The workaround/fix is to add the hostname of your machine to the localhost records in /etc/hosts,
as specified here:

https://thoeni.io/post/macos-sierra-java/

Cheers,
- hugi
Mime
View raw message