Survey JSON performance warning for non-wre-standard JSON modules/versions

If you have funny combinations of JSON, JSON::XS and JSON::PP installed,
JSON can start deciding to use JSON::PP instead of JSON::XS, which equals
bad performance on very large Survey instances.

This commit adds a new warning to the Edit Survey page if JSON->backend
is detected to be something other than JSON::XS.
This commit is contained in:
Patrick Donelan 2009-08-09 06:25:49 +00:00
parent af2d858f68
commit 2cc10d2953
2 changed files with 5 additions and 1 deletions

View file

@ -1370,7 +1370,10 @@ Returns an array of messages to inform a user what is logically wrong with the S
sub validateSurvey{
my $self = shift;
my @messages;
my @messages;
if (JSON->backend ne 'JSON::XS') {
push @messages, "Your server is using @{[JSON->backend]} as its JSON backend. This may hurt performance on large Survey instances";
}
#set up valid goto targets
my $gotoTargets = $self->getGotoTargets();