![]() |
![]() |
The efficiency of your custom application depends primarily on the number of API calls sent to the host. The Optimize Project feature provides common optimization techniques. The goal is to find opportunities to minimize trips to the host by combining API calls.
To reduce calls to the host, it is often more efficient to get more data than needed, and then perform extra parsing locally. For example, rather than getting data from two different fields on a host screen, it is often more efficient to use one API call to get all of the screen data and parse that data locally to obtain the two field values that you need.
The Optimize Project dialog box provides two sets of optimization steps. The first is a list of optimization steps that can be implemented in your project by the designer as a demonstration. The second set of optimization steps are included to describe some "manual" techniques that can be done after generating the code, and prior to moving your completed API set to production.
The designer uses two kinds of optimization methods. One kind occurs within the set of API calls associated with a single host screen. The other kind involves optimization steps that overlap one screen to another. In this case when the optimization is completed, you will notice some screens get removed from the API calls list in your project. In both cases you will notice a reduction in the number of API calls.
In the designer, API calls referencing user-defined variables will be bypassed by the demonstration Optimize Project steps, so you will need to manually code these after generation. Use the examples provided in the Optimize Project feature as a reference to help if needed.
The designer does not support the use of variables as input to API calls unless the variable is the only input. The designer checks the input string against its list of variable names. If it doesn't find an exact match, it just sends the value as a string.
For example, based on the other optimizations described here, you might try to send variable data with a sendKeys call, by entering the following as the inKeys value for a sendKeys call:
${variable_name}@E
This will not send the variable data, but the string ${variable_name}@E
. Instead, to provide variable data as input, you'll need to use a separate setFieldValue call, followed by the sendKeys call.
![]() |
|
![]() |
Optimizing a Project |
![]() |