How to Improve the User Experience of your PowerBuilder App?

Visual Expert offers a dedicated macro under Performance Analysis - Cumulated Execution Time - to find objects consuming most of the users’ time while using the application.

Measurement formula: [Average execution time * number of executions]

Using this macro, you can review the objects that may not be slow in execution but are executed so often that they end up hurting the overall experience of your PowerBuilder application.

You can choose the scope for this performance analysis from an entire application to one library, methods, objects, and so on.

Optimize General Performance of PB Objects 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.
    Select Root PBL in your App
  • In the Navigation Bar, go to Performance Analysis > Cumulated Execution Time
    Cumulated Execution Time Macro
    Visual Expert will display the top 10 objects - with the largest cumulated execution time - in a container hierarchy.
    Cumulated Execution Time Root PBL Result
  • Click on the wrench icon to open the macro options.
    Slowest Code 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 objects in the treeview, with the largest cumulated execution time.
    Modify Slowest Code Macro Options
  • You can also specify the minimum execution time for an item to be displayed in the result of this macro.
    For instance: 10 milliseconds, 20 milliseconds, 30 milliseconds and so on. Click on [Execute].
    Prioritize Minimum Cumulated Execution Time for PB Code
  • VE will then only display objects that exceed the specified limit.
    Display Objects Exceeding Minimum Cumulated Execution Time Limit

Optimize General Performance of PB Objects in One Library

  • Select any one library from all the PBLs available in the application.
    Select a PBL for Performance Analysis
  • Go to Performance Analysis > Cumulated Execution Time. (Same as above)
    Visual Expert will display the top 10 objects or methods with the largest cumulated execution time in that particular PBL.
    Objects Taking Most Time in a PBL

For One or More Specific Object(s)

  • Select one or more objects in the treeview.
  • Go to Performance Analysis > Cumulated Execution Time. (Same as above)
    Visual Expert will display methods taking most of users’ time for each object selected in the list.
    Display Methods with Most Cumulated Execution Time for Specific Objects

Analyzing PowerBuilder objects with high cumulative execution time will allow PowerBuilder developers to improve the overall user experience of the application.

See Also:

Visual Expert, PowerBuilder, Code Review, Code Metrics, Code Performance