Commit 871b3796 authored by root's avatar root
Browse files

Fix: List::load() does call check_param_constraint(). This is not required;...

Fix: List::load() does call check_param_constraint(). This is not required; check_param_constraint() only make sense when a family list gets re/instantiated. These calls are very expensive for institutions heavily using families. Our production list service has 2.500 lists; most of them belonging to a family. In these circumstances wwsympa.fcgi startup takes 3 minutes. Applying this patch lowers wwsympa.fcgi to 35 seconds. Much better. I did some tests to ensure this patch does not prevent param_constraint checking while instantiating, modifying, adding lists to families. My tests (based on Test::BDD::Cucumber) are public on https://github.com/salaun-urennes1/sympa-functional-tests
parent a4fa0b54
......@@ -990,26 +990,6 @@ sub load {
$self->{'admin'}{'family_name'});
return undef;
}
my $error = $family->check_param_constraint($self);
unless ($error) {
$log->syslog(
'err',
'Impossible to check parameters constraint for list % set in status error_config',
$self->{'name'}
);
$self->set_status_error_config('no_check_rules_family',
$family->{'name'});
}
if (ref($error) eq 'ARRAY') {
$log->syslog(
'err',
'The list "%s" does not respect the rules from its family %s',
$self->{'name'},
$family->{'name'}
);
$self->set_status_error_config('no_respect_rules_family',
$family->{'name'});
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment