Improve the overall performance of a PowerBuilder application

When dealing with large applications, it is difficult to know where to start and identify the main bottlenecks. Visual Expert helps you prioritize the objects or methods that need to be improved for better response times.

Using Average Execution Time for Performance Analysis

The macro Slowest Code (Tree) displays the object(s) or method(s) taking the longest average execution time when the application is running.
Slowest Code (Tree) Macro

It basically helps you find the slowest pieces of code, displaying them in a treeview.
This list of objects and methods is independent of how many times they are being executed during application runtime.
Find Slowest Methods in PB application

The treeview helps to identify the slowest components visually.
The longest yellow bar pinpoints the slowest code, and indicates its containers (VE project > PB application > PBL > object).

Using Cumulated Execution Time for Performance Analysis

The macro Cumulated Execution Time takes into account how frequently a method or an object is executed:
[Average execution time * number of executions]
Cumulated Execution Time Macro

It will enlist the objects or methods that consume the most of users' time.
Actually, even objects or methods with a medium response time can strongly degrade the performance and hurt overall user experience if they are executed very often.
Cumulated Execution Time Performance Result

Why check both angles for performance optimization?

Let's compare the top 5 results for the Slowest Code and Cumulated Execution Time in detached windows. To do so:

  • Right-click on the object, select [Create View from Selection].
    Create Views of Code Performance Result
  • Create two separate views to compare as shown below:
    Compare Performance Macros Views

The clicked event under the sales order menu is displayed as the slowest object, whereas the f_open function tends to be executed a very large number of times. Even if the f_open Function is not the slowest object, it would also be a priority to reduce its execution time.

This is how PowerBuilder developers can easily identify the priorities to optimize response times and improve overall performance of the app.

Performance Tuning for PowerBuilder | Watch Demo

A video tutorial from Elevate 2022 conference demonstrating the above use cases:


PowerBuilder, Code Performance, Improve Application Performance, Boost Application Performance