function RulesPlugin::optimize
Optimizes a rule configuration in order to speed up evaluation.
Additional optimization methods may be inserted by an extender implementing the RulesOptimizationInterface. By default, there is no optimization extender.
An optimization method may rearrange the internal structure of a configuration in order to speed up the evaluation. As the configuration may change optimized configurations should not be saved permanently, except when saving it temporary, for later execution only.
See also
1 call to RulesPlugin::optimize()
- RulesContainerPlugin::optimize in includes/
rules.core.inc - Overrides optimize().
1 method overrides RulesPlugin::optimize()
- RulesContainerPlugin::optimize in includes/
rules.core.inc - Overrides optimize().
File
-
includes/
rules.core.inc, line 1231
Class
- RulesPlugin
- Base class for rules plugins.
Code
public function optimize() {
// Make sure settings are processed before configs are cached.
$this->processSettings();
if ($this->facesAs('RulesOptimizationInterface')) {
$this->__call('optimize');
}
}