We noticed some performance issues with the execution of Groovy expression. In the GroovyExpression the script is parsed 2 times at each evaluation. You'll find attached a patch that caches the parsed-version of the scripts.
We did some performance tests with the following definition:
We took the average of 5 executions (without the first one):
|default, no cache||52690ms|
|patched, with cache||1017ms|
It's more than 50 times faster which is always nice to have