Visual Expert offers a dedicated macro under Performance Analysis - Slowest Code (Tree) to find objects with the longest execution time, slowing down your PowerBuilder application.
With Visual Expert, you can choose the scope for performance analysis from an entire application to one library, methods, objects and so on.
Find the Slowest Code in an Entire PowerBuilder Application
- Select the root of the PBL in the Main View.
This will include all the libraries present in your PB code.
- In the Navigation Bar, go to Performance Analysis > Slowest Code (Tree)
Visual Expert will display the top 10 slowest methods - with the longest average execution time - in a container hierarchy.
- Click on the wrench icon to open the macro options.
A new macro parameter window will open, wherein you can change the size of the list. - Change the number of items displayed from 10 to 20 and click on [Execute]. VE will then display the top 20 slowest objects in the treeview.
- You can also specify the minimum execution time for an item to be displayed in the result of this macro.
For instance: 5 milliseconds, 7 milliseconds, 10 milliseconds and so on. Click on [Execute].
- VE will then only display objects that exceed the specified limit.
Find the Slowest Code in One Library
- Select any one library from all the PBLs available in the application.
- Go to Performance Analysis > Slowest Code (Tree). (Same as above)
Visual Expert will display the top 10 slowest objects or methods in that particular PBL.
For One or More Specific Object(s)
- Select one or more objects in the treeview.
- Go to Performance Analysis > Slowest Code (Tree). (Same as above)
Visual Expert will display the top slowest methods for each object selected in the list.
The Powerbuilder developers can review these results to work on the objects with the longest average execution time and remove bottlenecks.