Web DataWindow settings

If you use Web DataWindows, tuning these settings can improve performance.

Tuning code generation settings You can tune the Web DataWindow settings to minimize the size of the generated JavaScript code. Doing so improves the client response time by avoiding the generation and network transport of unneeded code. If you do not use a feature such as display formatting, validation rules, or client-side scripting, disable code generation for the unused feature. You can also cache client-side methods in JavaScript files to reduce the size of the generated code and increase performance on both the server and the client. Without JavaScript caching, each time a Web DataWindow is rendered in a client browser, JavaScript code for DataWindow methods is generated on the server and downloaded to the client. However, there is no performance gain if the client Web browser settings prevent caching. The DataWindow Programmer’s Guide in the PowerBuilder documentation describes techniques for controlling the size of generated code.

Using custom containers For improved performance, use a custom component as the Web DataWindow container rather than the predefined HTMLGenerator component. When using a custom component, you can configure additional settings to reduce the number of method calls required to configure the component. Doing so can result in improved performance, maintainability, and scalability. Specifically, you can set the source file and DataWindow object on the server so that the DataWindow object is loaded when the component instance is created, resulting in fewer method calls from server-side scripts in the Web page. You can also improve performance by having your custom component maintain its state. For more information, see the DataWindow Programmer’s Guide in the PowerBuilder documentation.

Changing the Web target default behavior By default, the PSJaguarConnection methods for using a Web DataWindow make several trips to the server. You can set the bOneTrip argument to make one trip to the server instead. Doing so improves performance by reducing network traffic. For more information, see the PSJaguarConnection reference pages in the Web and JSP Target Reference manual in the PowerBuilder documentation.