Page 1 of 1
Performance differences
Posted: Saturday 06 June 2020 14:00
by Plantje
Quick question: are there (noticeable) performance differences between Blockly, LUA, dZEvents or any other of the scripting languages within Domoticz?
And then I mean: either performance in running the script itself, but also hindering system performance. So, is a Blockly script heavier on the system than for example LUA?
Re: Performance differences
Posted: Saturday 06 June 2020 14:32
by waaren
Plantje wrote: ↑Saturday 06 June 2020 14:00
Quick question: are there (noticeable) performance differences between Blockly, LUA, dZEvents or any other of the scripting languages within Domoticz?
Under the hood Blockly, Lua and dzVents are all using the same Lua engine in domoticz so from that perspective you will not see a difference.
However.. (from the dzvents wiki)
If (on slower machines) events get queued up in Domoticz, they will be sent to dzVents in one-package. This makes event processing significantly faster.
So if you have many device and timer triggered scripts and you are already reaching the limits of your system you might see a difference.
Re: Performance differences
Posted: Saturday 06 June 2020 14:38
by Plantje
Thanks! How do I know if I am reaching the limits of my system?
I think I am reaching the limits as it is an Atom N450 with 2GB of RAM.... which is not a lot!
Re: Performance differences
Posted: Saturday 06 June 2020 15:29
by jvdz
You'll notice it when the events start taking longer to complete as they are run in a single thread sequentially.
I am not a user of dZEvents as I've already scripted everything in LUA files, but can confirm like @waaren stated that it is way faster to work with one devices and timescript event script and have those master-scripts do the processing for all time/device events.
Jos
Re: Performance differences
Posted: Saturday 06 June 2020 16:46
by EddyG
I use 70+ scripts in dzVents and 10+ scripts in bash by cron.
On the hour almost everything is running, and all scripts ends within 1 second on a Pi 3B+ My average CPU use is approx. 5%
Of course after a few seconds comes the response from different httpResponse-events
Re: Performance differences
Posted: Saturday 06 June 2020 20:40
by Plantje
Well, sounds like there is not going to be an issue. I'll just have to pick the way of coding that suits me best. Thanks all!