Editing Rule Machine Rules with Variables Very Slow

I have no problems with my rules executing but this issue is the performance of the Rule Machine rule creation or editing. If I keep rules to device properties and actions editing the rules are really fast. But the moment I add variables and other things I can count to 10 each time I click the mouse to wait for the spinning circle or for the display to update the changed rule syntax.

Here is an example of what I have using variables:

If I go in and say edit a action that I want to change the variable assignment and it requires 3 different elements to be defined I am looking at almost a minute in delay time to complete the edit.

Can you guys look at optimizing this process? It's taken me a week to implement my new weather station and adding the logic to my rules for each room based on the status the lux and other weather sensors.

Thanks

+1

I have many rules similarly predisposed to grind the hub to a halt. [EDIT for clarity - when EDITING the rule]

Which is exactly why many of us maintain the hub needs more "grunt", since this is nothing to do with the mesh. Or a complete rewrite of RM...

It's called Node-RED...

2 Likes

Did anyone read my post? Or are we just quick to judge that Hubitat is slow and unstable?

It's not the rule execution that is slow it's creating the rule that is slow each one of these rules runs instantaneously and I have over 150 devices, rules, etc. It's when I am building it takes 30 to 40 seconds per action to enter into rule machine.

No the answer isn't gunt or node red sorry guys I have had this thing humming like a well oiled machine and doing fine for 2 years now, I just want the Hubitat devs to look to see why it takes long to edit / update rules that use variables.

Here is screenshot of how many rules and apps I am running and very happy:

1 Like

I have not seen this, but will look into it. Do you have a lot of variables?

Sorry, but there are only 2 things causing the hub to respond slowly when editing a rule. Not enough "grunt" or software that needs improvement. Or the manufacturer would have to explain that this level of performance is "as designed" and you have to live with it. So yes it is absolutely a valid comment.

Where do you think the compute power comes from when editing a rule?!?

I've also edited my comment above to clarify it's while EDITING complex rules that the hub can perform very slowly in my experience too.

The commenter who suggested Node-RED may also have been thinking about the context of editing rules. Which is significantly easier than in RM. So again, it would absolutely be a valid approach to making editing of rules more easy and quicker (although for sure it does take an investment of time/effort to set up in the first place).

This sounds like a bug. Will investigate.

Update: I've found the cause of this, and will correct it.

11 Likes

Depends what you mean by a lot :thinking:

I just did a cursory count and I have 98 variables defined in rule machine. I will send you a PM with a screen grab of the list.

The latest release addresses this problem you reported. Please check it out, and see if editing your large rules, or creating them in the first place, is no longer a big slowdown.

2 Likes

Much better thanks for the fast turn around on this.

1 Like

Now there are two ways the list of actions is created for display. The old slow way updates every device current value. This method is what creates the list of actions on the main rule page. The second new fast way only spits out the text for each action without doing that update. So while you are working on the actions the presentation will not show changes that have happened to device values. If you want this view updated to current, simply hit Done with actions, returning to main page, and everything will be updated to current.

In my testing, using the rule you showed above, before the change I saw the slowdown you complained about (which I think depends somewhat on the browser used). After the change, I don't see that slowdown anymore.

1 Like

Thanks again. I just edited 20 actions and conditions and it's working fine. No issue with the updates happening after "Done with Actions". I think I will finally get in the changes I need to handle my new weather station and all the sensors it brings.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.