Try OpenEdge Now
skip to main content
Application Developer's Guide
Developing an application : Using JavaScript in a workstep : Integrating JavaScript : Improving JavaScript performance
 
Improving JavaScript performance
Keep the following tips in mind while creating your JavaScript to improve the performance of your code:
*Always use the var statement to access variables.
For example, var message = "HELLO";
*Always define JavaScript arrays to be of specific size, or with a list of initial elements.
For example, var s_objs = new Array(10);
*Avoid using the eval and new functions.
*Avoid using the with statement.
*Always specify classes with a fully qualified name. Use "Packages" keyword when using such classes. Refer to Invoking Java methods in JavaScript.