1. Ferdinand Fischer
  2. PowerBuilder
  3. Sunday, 13 December 2020 15:23 PM UTC

Hi,

i am want improve the performance of an window.

The profiler shows me that 5 seconds are spent inside of opensheet i.e. inside of powerbuilder. 

Has anyone an idea how to get more information where the 5 seconds are spent?

The window has many objects and is used for statistics:

'CommandButton';3
'Tabcontrol';4
'StaticText';54
'UserObject'(20 Tabpages) ;57
'DataWindow';76

Regards,

Ferdinand

 

Attachments (1)
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Friday, 18 December 2020 11:21 AM UTC
  2. PowerBuilder
  3. # 1

Hi Ferdinand

As Chris has said, I'd be looking at the DWs and UO constructor events to see what they are doing. Given that you have over 70 DW which I guess are all retrieved in the opening sequence, if each one only took 0.065 of a second to retrieve then that would be your 5 seconds.

If the DWs are retireved in the open sequence of events that you can chaneg that to only retrieve on demand as the user selects the relevant tab.

It should be fairly easy but tediod to work through the events and speed it up.

I'd start with Chris's suggestion and set the tab properties to create on demand, that a very quick and easy fix and may well solve your problem. See option near the bottom of the image below.

Cheers

David

 

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 18 December 2020 04:27 AM UTC
  2. PowerBuilder
  3. # 2

Most of the times, DB retrieval is what is slowest.

Run a database Trace on the application:

If you want to only check the SQL execution times of one window, then in the open event, disconnect and re-connect with sqlca.dbms = "TRACE ......."

From the same open, launch an event with POST to do the disconnect and re-connect without the TRACE keyword in the sqlca.dbms.

(of course this is just to run your test).

regards.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Sunday, 13 December 2020 17:15 PM UTC
  2. PowerBuilder
  3. # 3

Hi Ferdinand;

   One of the big overheads in your description are Tab Controls and their Tab Page child objects. Many app developers need complex processing in these objects but fail to use "Create On Demand" option. The default is off which means that all Tab Pages and their child objects run their "constructor" events before the parent window' open event.

  The next area is the DataWindow objects and what each DWO is doing in their instance. Can some of these DWOs processing be delayed or optimized?

  User objects are another optimizing opportunity. Instead of placing the UO's on their parent objects at design time. Consider dynamically creating them only when needed using the OoenUserObject() command.

HTH

Regards .... Chris

Comment
  1. Ferdinand Fischer
  2. Monday, 14 December 2020 17:22 PM UTC
Hi Chris,



i use the the routine view and the the issues are not visible. See the screenshot in my first post.

it only shows that 5 seconds are used ine the opensheet itself.



  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 14 December 2020 18:48 PM UTC
Have you tried the other two Profiler Views?

Have you tried writing your own profiler analysis tool? FYI: Check out the new "Real Time Profile Model Display" in the latest STD Framework as an example of using your own Profile Viewer. In this case, I can use it externally or within the App in "real time" ....

http://chrispollach.blogspot.com/2020/08/2020r2.html

  1. Helpful
  1. Benjamin Gaesslein
  2. Thursday, 17 December 2020 08:44 AM UTC
Try Profiling Trace View, find the call to opensheet() that is taking 5 seconds and go from there. I've found this view to be the most useful for pinpointing long-running functions.

The most likely culprit are indeed the tabpages, specifically any code in their respective constructors.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.