From: Mike G. v. a. <we...@ma...> - 2005-07-29 21:40:54
|
Log Message: ----------- Backing out of the changes just made for a moment. I've discovered that making this switch: CGI::p(CGI::code($details)), to CGI::code(CGI::p($details)), speeds things up immensly. (From 165 seconds down to 12 seconds on the example I'm doing.) Even without any other changes. Since the other changes complicate things a bit, I'll put off adding the ability to have $details be a reference. It's possible that allowing $details to be passed as a reference is a good idea anyway, on general principles. I want first to see if it makes a difference in terms of memory consumption. Modified Files: -------------- webwork-modperl/lib/WeBWorK: ContentGenerator.pm Revision Data ------------- Index: ContentGenerator.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator.pm,v retrieving revision 1.139 retrieving revision 1.140 diff -Llib/WeBWorK/ContentGenerator.pm -Llib/WeBWorK/ContentGenerator.pm -u -r1.139 -r1.140 --- lib/WeBWorK/ContentGenerator.pm +++ lib/WeBWorK/ContentGenerator.pm @@ -1671,17 +1671,8 @@ my %headers = $r->headers_in; join("", map { CGI::Tr(CGI::td(CGI::small($_)), CGI::td(CGI::small($headers{$_}))) } keys %headers); }; - # dereference details, - # if it is a long report pass details by reference rather than by value - my @expandedDetails; - if (ref($details) =~ /SCALAR/i) { - push @expandedDetails, ${$details}; - } elsif (ref($details) =~/ARRAY/i) { - push @expandedDetails, @{ $details }; - } else { - push @expandedDetails, $details; - } - return join("", + + return CGI::h2("WeBWorK Error"), CGI::p(<<EOF), WeBWorK has encountered a software error while attempting to process this @@ -1692,7 +1683,7 @@ CGI::h3("Error messages"), CGI::p(CGI::code($error)), CGI::h3("Error details"), - CGI::code(CGI::p(@expandedDetails)), + CGI::code(CGI::p($details)), CGI::h3("Request information"), CGI::table({border=>"1"}, CGI::Tr(CGI::td("Time"), CGI::td($time)), @@ -1701,8 +1692,7 @@ CGI::Tr(CGI::td("HTTP Headers"), CGI::td( CGI::table($headers), )), - ), - ); + ); } =item warningOutput($warnings) |