How to explain these delays?

Done. I've run these tests several times and the delays seem to be consistent. However, the delays jumping through the nesting is not consistent from rule to rule. That is, calling rule 2 from rule 1 is almost instant, but calling rule 3 from rule 2 takes about 1 second. Then returning from rule 3 to rule 2 is almost instant but returning from rule 2 to rule 1 takes 3 seconds.

So the rules I have now are:
Rule 1: Call Rule 2
Rule 2: Set the private boolean of rule 1 to false then true and then call rule 3
Rule 3: Run through an IF/ELSE statement using a local variable



It takes over 13 seconds to run this sequence on 2.4.0.147 (C8) compared to 300ms on 2.3.9.200 (C5).

2.4.0.147 logs:

2.3.9.200 logs:

So, unable to replicate your issue with IF/ELSE @anne.hubitat, but there is definitely something fishy going on either with C5 vs C8 or 2.3.9 vs 2.4.0 when it comes to calling other RM rules or performing private boolean operations on other rules @a.mcdear @bravenel

Edit: I created and ran the same rules on a C7 2.3.9.200 as well, and that one took 350ms to run through the whole sequence. So maybe it is more pointing towards a change that was introduced with 2.4.0 rather than with C8.