Background
Etlworks uses JavaScript engine Nashorn and Python engine Jython for scripting. These engines are integrated into common Etlworks scripting framework (CSF), which significantly enhances capabilities of ETL transformations. Read more about scripting in Etlworks. Prior to Nashorn CSF was using an older version of JavaScript engine called Rhino. To this date CSF maintains a backward compatibility with scripts written for Rhino.
What's changing?
JavaScript
One of the most commonly used features of Rhino is an ability to import Java packages into JavaScript code using function importPackage(package)
.
In the update which became available on May 10, 2023 using of importPackage(package)
function was deprecated. Prior to this update the CSF was loading nashorn:mozilla_compat.js
to maintain compatibility with Rhino on each code execution. Loading this script on each code execution has a significant impact on performance and RAM utilization footprint.
The update introduced a logic which loads nashorn:mozilla_compat.js
only if CFS detects a code which requires a a backward compatibility with Rhino (including using of importPackage(package
).
Python
The Jython was upgraded to the latest and greatest version which demonstrated much better performance in our tests than the previous version used by CSF.
CSF
We completely changed how CSF caches JavaScript and Python scripts compiled to Java bytecode. We also significantly reduced an overhead related to executing the scripts. Both changes should have an immediate positive impact on performance and RAM utilization footprint.
How does it affect our flows?
This change should not break any exiting JavaScript code but it is highly recommend to update the code using either fully qualified class names or JavaImporter function. It will have a substantial positive impact on performance, specifically when the scripting is used in Mapping to calculate field's value or in any scripting transformation which is executed for each row of a large data set.
Scripts written in embedded Python (Jython) are not affected.
Comments
0 comments
Please sign in to leave a comment.