Query On Script Performance (Javascript vs Groovy)

Hi,
I would like to know which one is performant in script. Is it javascript or groovy.
I came from another BPM product and as per my knowledge groovy will be much faster than javascript.

Correct me if my understanding is wrong.

Purpose:
I’m trying to transform response of external call so I need to write few lines of code. Hence, I would like to know.

Thank you in advance.

Hello my friend!

The difference in performance between the two is very insignificant, as
both languages are interpreted…

What should count when choosing between one of them in this case, is your familiarity with the language that will help you a lot with your agility in development…

But in performance, you will not have significant gains in choosing between one or the other.

I use Javascript internally in camunda’s “tasks” because of the familiarity I have with the language.

But I really like using JavaDelegates in my projects as well with classes created directly in my springboot project.

William Robert Alves

I heard interpretation of JS is slower compare to Groovy

which I can see in thread Scripting Performance - Camunda Platform 7 Topics / Discussion & Questions - Camunda Platform Forum

so wanted to confirm.

I’ve tested both, and I didn’t notice any difference in performance…

Maybe you’ll notice something if you do something GIANT inside your Camunda, but I opted for javascript because I develop much faster and I didn’t notice a difference in performance in my tests.

William Robert Alves

1 Like

I will recommend to use a JVM language . Javascript is not native to JVM and we have seen some performance issue in past with older version of Camunda and Jdk. JVM used to build heap and never come down. The issue was solved since we moved to Groovy.

2 Likes

Since Java stopped shipping the javascript with the runtime - I would say there isn’t a big difference in performance between the two. They’re both pretty fast.

Just the one that you can write the best code it, better code will run better that could be the biggest difference in performance.

3 Likes