Processing speed: task or VBscript equivalent?

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
Steve Horn
HouseBot Guru
Posts: 750
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Processing speed: task or VBscript equivalent?

Post by Steve Horn »

I have a task that checks for a property value for one of three values and based on that finding does one thing. Pretty simple steps: an IF test, followed by an ELSE IF, and a final ELSE. And with a positive match is just executing a task that turns on a light. Nothing exotic here. But it SEEMS to be missing the change in the property value occasionally. I got to wondering if I coded the equivalent in a short VBScript whether it would "run faster", i.e. be more reliable. I could try it, obviously. But I thought it was a decent gee whiz question that, until now, I never thought about. :?
Full disclosure: The failure to turn on the light may be elsewhere though, due to what else is involved "downstream": external GPIO board, relays, switches, etc. But if I can prove that the task is reliable, then I can focus on the downstream stuff.
Steve
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Processing speed: task or VBscript equivalent?

Post by ScottBot »

Steve,

A HouseBot Task should be faster than a VB Script. Although VB Scripting is pretty fast, it still has to load the VB engine, load the script, and finally, interpret and execute the script.

Anything is possible, but it's doubtful that the task is missing a change. When you save a Task, it will register itself with each Property that is part of it's condition. When a Property changes, it will run thought the list of registered Tasks and evaluate them. So if it works right for one PV change, it should be working the same for all.

As a side note, the next version will have a Task condition option for each Property to allow you to exclude it from task evaluation. This can be helpful for things like when you have a time property in a condition, but don't want the task evaluated every second (this probably won't make sense unless you have been through it :wink: )
Scott
Steve Horn
HouseBot Guru
Posts: 750
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: Processing speed: task or VBscript equivalent?

Post by Steve Horn »

Good to know... And intersting. I would have bet just the opposite. Now I can look at the the other glue needed to turn on the light. Thanks!
Steve
jacobcarl
Member
Posts: 3
Joined: Mon Mar 28, 2016 1:42 am
Location: Bangalore
Contact:

Re: Processing speed: task or VBscript equivalent?

Post by jacobcarl »

Wow that really simple and interesting .
Post Reply