cosimo/perl5-net-statsd — Issue #3: Net::Statsd opens a new UDP connection every send(), wasting CPU
Author: nhooey
Created: 2012-03-08 15:41:24+00:00
State: open

Net::Statsd opens a new connection every time send() is run, which wastes a lot of CPU.

However, the module is also made up of static functions, and setting the port is done by changing a global variable, so there is no obvious place to start the connection.

The module should be redesigned to be object-oriented so you can open the connection on construction, and check that the connection is still active whenever you send.

I will try to fix this today in the fork shutterstock/perl5-net-statsd, but let me know if you'd like to help.