1. Gerry Whitmarsh
  2. PowerBuilder
  3. Wednesday, 19 July 2017 13:12 PM UTC

I have this really strange issue. I have two pfc applications. The two applications are in separate folders and contain all the necessary PBLs. The second application is a copy of the first with some changes. I have an MDI window w_frame_br (inherited from w_frame) which is opened from n_cst_br_appmanager (inherited from n_cst_appmanager). Up to logging in to the database (from w_frame_br) the two applications are identical. The problem is this: The statement open (w_frame_br) in application A opens the window almost immediately whereas in application B it takes 7 seconds or more to open which I know will cause problems when rolled out. By open I mean reaching the first statement in the open event. I have even copied w_frame_br from A to B but it still takes 7 seconds to open. In debug, I “step in” to the open statement and it takes the 7 seconds just to reach “ue_parentnotify”. As this seems to be the first statement I am at a loss to know where to look. This happens in development and when running the exe. The library list is in the same order, the pfc/pfe PBLs are the same in both applications and I have optimized all the PBLs.

Any idea how I can tackle this issue?



W10, PB2017

Accepted Answer
Matthew Balent Accepted Answer Pending Moderation
  1. Wednesday, 19 July 2017 13:21 PM UTC
  2. PowerBuilder
  3. # Permalink

Have you tried using PBDebug and if so, what did the output give you?

  1. Gerry Whitmarsh
  2. Wednesday, 19 July 2017 17:38 PM UTC
Thank you very much for the reply. I have never used PBDebug before (never had to). Anyway, I found some strange behavior in the generation of the menu so I copied the menu from the correctly working application, rebuilt and now the problem has gone away. Must have got corrupted in the migration. Great answer, thanks again.

Gerry. And thanks to all the others who took the trouble to reply.

  1. Helpful
There are no comments made yet.
Ashutosh Varshney Accepted Answer Pending Moderation
  1. Wednesday, 19 July 2017 16:25 PM UTC
  2. PowerBuilder
  3. # 1

This is a tough one to debug. I would suggest you do a PBDiff  between the two apps to see if you can narrow down problem code. You can also try to open the frame directly in the application object and then see what happens.

Another thought - do you have some code in the app manager init which might cause the delay - constructor or pfc_open or some other function?

  1. Ashutosh Varshney
  2. Wednesday, 19 July 2017 16:27 PM UTC
Also check your variable types (n_tr, n_err, n_msg) .

  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 19 July 2017 16:37 PM UTC
  2. PowerBuilder
  3. # 2

Hi Gerry;

  My suggestions would be ....

1) Run the slow App through the "Application Profiler" and  see if it pinpoints either a long wait or intensive CPU in the offending area.

2) Check your Constructor events for code that could cause excessive delay. Constructors run before the Open event - Activate event as well.


Regards ... Chris

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.