r1397@llin: dpavlin | 2007-10-31 01:38:40 +0100
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 31 Oct 2007 00:38:38 +0000 (00:38 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 31 Oct 2007 00:38:38 +0000 (00:38 +0000)
 never ever call dump unless working with debug
 (20% improvement in speed of record processing :-)

git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@925 07558da8-63fa-0310-ba24-9fe276d99e06

lib/WebPAC/Output/JSON.pm
lib/WebPAC/Output/KinoSearch.pm
lib/WebPAC/Output/Sorted.pm

index d412448..049d679 100644 (file)
@@ -79,7 +79,7 @@ sub add {
        $log->logdie("need id") unless defined $id;
        $log->logdie("need ds") unless $ds;
 
-       $log->debug("id: $id ds = ",dump($ds));
+       $log->debug("id: $id ds = ",sub { dump($ds) });
 
        push @{ $self->{_data} }, $self->ds_to_hash( $ds, 'display' );
 
index 8349550..cb48b06 100644 (file)
@@ -132,7 +132,7 @@ sub add {
        $log->logdie("need id") unless defined $id;
        $log->logdie("need ds") unless $ds;
 
-       $log->debug("id: $id ds = ",dump($ds));
+       $log->debug("id: $id ds = ", sub { dump($ds) });
 
        my $hash = $self->ds_to_hash( $ds, 'search' ) || return;
 
index 63d90b2..69cbf61 100644 (file)
@@ -81,7 +81,7 @@ sub add {
        $log->logdie("need id") unless defined $id;
        $log->logdie("need ds") unless $ds;
 
-       $log->debug("id: $id ds = ",dump($ds));
+       $log->debug("id: $id ds = ",sub { dump($ds) });
 
        my $hash = $self->ds_to_hash( $ds, 'sorted' ) || return;