|
I've got a Linux machine generating OSC messages
and a Windows machine that I connect sporadically
to its network to receive said messages.
The problem is that gethostbyaddr()(called in
Server.pm) can be very slow on a LAN without
a proper DNS configuration
(this little audio network never needed one).
The result is completely unacceptable OSC message
delivery performance.
I'd like to suggest putting something like
the following into Server.pm (for when this
situation occurs) -- or just put this information
where people having performance problems
can see it so they can hack out gethostbyaddr()
the way I did. The code below becomes very
fast after seeing that gethostbyaddr() is slow.
my $fastdns = 1;
.
.
.
if ($fastdns) {
my $now = time();
...gethostbyaddr()...
if ($now - time() > 2) { $fastdns = 0; }
} else {
$host = '';
}
|