Comparing different automation languages

Hello,

in OH 4.2.1 there are these file sizes:

org.openhab.automation.groovyscripting-4.2.1.jar — 7.6 MB
org.openhab.automation.jrubyscripting-4.2.1.jar — 32 MB
org.openhab.automation.jsscripting-4.2.1.jar — 26 MB
org.openhab.automation.jythonscripting-4.2.1.jar — 46 MB

Is the loading time on each OpenHAB start proportional to the jar file size? That is, does on boot up Groovy load 3.42 times faster than JSScripting (or as proportions listed below)?

Are the run time memory requirements proportional to the jar file size? That is, are the run time memory requirements for Groovy:JRuby:JSScripting:Jython in proportion 19 : 80 : 65 : 115?

If the program logic is implemented in different languages equivalently, is the execution of the automation script in terms of memory and speed the same for all languages (or almost the same)? If not, which languages are “better”? I am not talking about the impact of Compilable scripts, which are compiled after everytime they are changed.

Thanks
Дилян

No.

No.

There are bound to be some differences and it’s unlikely that one is always faster for every rule or in the same ways. But for the most part the differences will usually be insignificant and not meaningful in a home automation context.

There are differences in time to load and parse roles between languages on different machines but one running they all perform fairly close in running time.

If performance at that level is a problem, OH over all may not be the best option or your time and effort might better be spent making sure OH is running on a machine with adequate resources.

2 Likes

Not to be too dismissive, but are you sure that you know, what you are doing?

How do you expect file sizes of that variation to have any significant correlation with overall performance? Even if, your question is akin to “if a car is smaller, does that mean it’s faster?”

Best of luck, since you will need it as I reckon.

1 Like