Nags, The test still occurs, but the issue is what happens after the test. ?A related factor is what causes a ConditionNG to execute. With the exception of ConditionalNGs configured to run after file loading, most of them are activated by a change to an item in an If-then-else action. ?The default is that items added to the "if" have the "listen" setting enabled. ?A change to one of these will start the ConditionalNG. ?Items that have "listen" disabled will not start the ConditionalNG but will be evaluated to determine the true/false state of the if-then-else. It can help to separate the trigger events from checks for item states. ?For example, think of a yard ladder with sensor buttons for each track and an occupancy sensor for the turnout ladder. ?The sensor button will trigger a ConditionalNG for the selected track. ?The sensor is defined as "listen" and the if-then-else is "on change". ?When that test is true, a second if-then-else checks for other items, such as ladder block occupancy, etc. ?These are defined as "no listen" which prevents unplanned running of the ConditionalNG. ?This if-then-else is also set to "always execute" since the occupancy might not have changed since the last run. ?When this is true, the turnouts can be set. For this example, a "sensor group" is used to make sure that only one track button is active. ?One ConditionalNG will run when its sensor becomes inactive resulting in the first test being false which does nothing. ?Another ConditionalNG will run when its sensor becomes active. ?This one will do more work. Dave Sand ----- Original message ----- From: "Nags via groups.io" <snowy999=[email protected]> Subject: Re: [jmriusers] LogixNG vs Jython performance #jython #logixng Date: Thursday, March 20, 2025 4:11 PM On Fri, Mar 21, 2025 at 02:02 AM, George Hofmann wrote: For example I am not understanding why legumes are involved. Pay that! I find myself using LogixNG more and more and I did wonder what the overhead was. What does catch me out occasionally is Execute on Change vs. Always Execute. The conditional doesn't execute even though I reckon it should have. Sometimes I give up trying to figure out why and just make it Always Execute. ? Therefore, what is the performance penalty of one over the other? I assume in either case it still has to test the conditions. -- H.O. Australia (Layout in Progress) Digikeijs DR5000 LocoNet JMRI v5.10 DecoderPro/Warrants/CPE/SML/LogixNG Java: OpenLogic jre-17.0.12.7 ? Windows 10 |