improve speed of sh/c/n (a bit)[probably].
authorDirk Koopman <djk@tobit.co.uk>
Wed, 11 Jul 2007 15:15:52 +0000 (16:15 +0100)
committerDirk Koopman <djk@tobit.co.uk>
Wed, 11 Jul 2007 15:15:52 +0000 (16:15 +0100)
Changes
cmd/show/configuration.pl
perl/Version.pm

diff --git a/Changes b/Changes
index e80e894a6e8fe8313d5905a51d3268595a639959..dfe89c6a9abbe07ac2376792072978106e570891 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,5 @@
+11Jul07=======================================================================
+1. improve speed of sh/c/n
 09Jul07=======================================================================
 1. remove check for PC93 from legacy nodes. This will allow PC10s to be
 propagated correctly. Probably.
index 09521cb6b7406e3d062994c90158243df744b857..746ab4b0068390b9b32e8bc08c20a1fb3e35a221 100644 (file)
@@ -16,15 +16,18 @@ my @val;
 
 push @out, $self->msg('showconf');
 if ($list[0] && $list[0] =~ /^NOD/) {
-       my @ch = sort {$a->call cmp $b->call} DXChannel::get_all_nodes();
+       my %ch;
        my $dxchan;
        
-       foreach $dxchan (@ch) {
-               @val = sort {$a->call cmp $b->call} grep { $_->dxchan && $_->dxchan == $dxchan } @nodes;
+       foreach my $n (@nodes) {
+               $dxchan = $n->dxchan;
+               push @{$ch{$dxchan->call}}, $n;
+       }
+
+       foreach my $call (sort keys %ch) {
+               @val = sort {$a->call cmp $b->call} @{$ch{$call}};
                @l = ();
-               my $call = $dxchan->call;
-               $call ||= '???';
-               $call = "($call)" unless $dxchan->here;
+               $call = "($call)" unless DXChannel::get($call)->here;
                push @l, $call;
                
                foreach my $ref (@val) {
index 93cd53b037a63b6a52ffd2530b9d4e70f012388a..1489fa485b40ccce99f351f7e86d12189c049a53 100644 (file)
@@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
 
 $version = '1.54';
 $subversion = '0';
-$build = '112';
+$build = '113';
 
 1;