Scripting Engine for Server-Side Scripts

If you are using server-side scripting, you can enable the scripting engine for much better performance. Simple scripts should execute twice as fast, while we observed gains of up to 10 times on more complex scripts.


The scripting engine is used to run server-side scripts (Device Mapper Scripts, Script Expressions, Apps).  This makes it possible for GpsGate to handle more volume and complexity with scripting in an even faster and more efficient manner than before.

Most significant improvements should be seen on large servers where many scripts are executed in parallel. In such cases processor use for script execution should be more than halved when the new engine is enabled, improving the overall performance of the entire server.

Enabling the new scripting engine

After the updates, go to SiteAdmin > Settings > Scripts. You will find the new option Enable new script engine there. Enable it and click Save.

J2_Enable.png

That is all there is to it. The bigger the server with the more scripts in use, the more noticeable the performance improvements will be. For more concrete numbers, you can examine the scripting performance changes from SiteAdmin > System Tools > Profiler.

Differences between engines

While the old engine covers most of ECMAScript 5 standard approximately, new scripting engine fully adheres to ECMAScript 5.1 standard. This means that many of the standard JavaScript options that were not available in the old engine will be available in the new one.

However, this also means that the new engine will throw errors in strict adherence to the standard. For example, while accessing an element of an empty array returns null with the old engine, it will correctly result in an error in the new standard. In cases like this, you should modify your script with appropriate null/empty checks to avoid errors.