I am using TelemetryMetricsStatsd to send Ecto query telemetry. I
noticed this slowed down some of our calls. One of the more expensive
operations is apparently :inet_udp.getaddr/1. However, there is no need
to look up localhost using this function. I have included some benchmark
information collected with fprof below.
I am using TelemetryMetricsStatsd to send Ecto query telemetry. I noticed this slowed down some of our calls. One of the more expensive operations is apparently :inet_udp.getaddr/1. However, there is no need to look up localhost using this function. I have included some benchmark information collected with fprof below.
When using localhost:
When using 127.0.0.1:
Load tests of my application also show a significant performance improvement after this change.