I still believe this is an issue particular to your setup. Sometimes DNS
lookups seem to be very slow. What changed from 7.8 to 7.9 is that we do
a lot of those lookups when rendering a page with artwork (in order to
figure out what resizing method to use).

What surprises me is the fact that this lookup seems not to apply any
caching. Or maybe there's some caching going on in the OS, and that's
what is broken on your system ;-). 

Therefore I wonder whether the following would improve the situation for
you. It's adding caching in our code. Basically replace
Slim::Utils::Network::ip_is_private with the following code:


Code:
--------------------
    my %cache;
  require Tie::Cache::LRU::Expires;
  tie %cache, 'Tie::Cache::LRU::Expires', EXPIRES => 60, ENTRIES => 100;
  
  sub ip_is_private {
        my $ip = shift;
        my $cached = $cache{$ip};
        
        return $cached if defined $cached;
        
        my $packed_ip = inet_aton($ip);
        
        my $is_private;
  
        if ($packed_ip) {
                # http://www.perlmonks.org/?node_id=791164
                $is_private = $packed_ip =~ m{
                ^
                (?: \x0A             # 10.0.0.0/8
                |   \xAC[\x10-\x1F]  # 172.16.0.0/12
                |   \xC0\xA8         # 192.168.0.0/16
                )
            }x;
        }
  
  $cache{$ip} = $is_private ? 1 : 0;
  return $is_private;
  }
  
--------------------



Michael

http://www.herger.net/slim-plugins - MusicArtistInfo, MusicInfoSCR
------------------------------------------------------------------------
mherger's Profile: http://forums.slimdevices.com/member.php?userid=50
View this thread: http://forums.slimdevices.com/showthread.php?t=107155

_______________________________________________
beta mailing list
beta@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/beta

Reply via email to