This is the patch for rules_optimization module rule sets integration.

Comments

klausi’s picture

Component: Rules Core » Rules Engine
Status: Needs review » Needs work

Rule set related code should go to the Rule set class, not to the generic plugin class.

Saubhagya’s picture

Status: Needs work » Needs review
StatusFileSize
new1.46 KB

Yes, I moved the code to rule sets.

fago’s picture

Status: Needs review » Needs work

I think if we add that, we should add it generically for all components - thus in the parent implementation.

However optimizing rule sets will be hard, as the execution order is important there. Let's make sure it's working fine for event sets first. Anyway, let's add this in asap.

Saubhagya’s picture

Status: Needs work » Needs review
StatusFileSize
new3.39 KB
klausi’s picture

Status: Needs review » Needs work
+++ rules/includes/rules.core.inc
@@ -943,6 +943,7 @@ abstract class RulesPlugin extends RulesExtendable {
         // Clone the component to avoid modules getting the to be cached
         // version from the static loading cache.
+        $component->__call('optimize');

now the comment does not belong to this line. A separate comment for optimize() would be nice.

What about event sets? Do we leave the second optimize() call there because we create a new one?

This is a lot of duplicate code. I think it would be better to use an info_alter hook to add the optimization extender to all components.

Powered by Dreditor.

fago’s picture

Status: Needs work » Fixed

I improved how optimizers are integrated so we don't need the empty default extender + components are generically supported (not only rule sets). Please test and report whether it works as it should ;)

Pranshu’s picture

Status: Fixed » Needs review
klausi’s picture

why? this issue is resolved?

Pranshu’s picture

Status: Needs review » Fixed

sorry about that..I'm kinda newbie here, didn't intended this to happen !

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.