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.
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.
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]
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.
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 two separate views to compare as shown below:
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: