Performance differences

Moderator: leecollings

Post Reply
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Performance differences

Post 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?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Performance differences

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Performance differences

Post 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!
User avatar
jvdz
Posts: 2333
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Performance differences

Post 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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Performance differences

Post 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
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Performance differences

Post 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!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest