1. Thierry Garrigues
  2. PowerBuilder
  3. Wednesday, 12 April 2023 07:41 AM UTC

Hi

I'm looking to optimize the execution of a large application write in Pb2022 application.

Opening windows takes a long time the first time while it is faster afterwards.

I wonder if it might be related to loading pbd into memory.

I am looking for a "tool" that would allow me to check/control the .pbd files that are mounted in memory as I run an application made in powerbuilder .

I take advice on the organization of objects / pbl in order to improve performance

Regards

Thierry

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 13 April 2023 08:13 AM UTC
  2. PowerBuilder
  3. # 1

Hi,

If anything is slow "the first time", but faster afterwards, that makes me think of DB caching having kicked in. Of course a profiling tool would point that out, but initially I'd recommend looking at the times for DB retrieval.

regards.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 12 April 2023 16:17 PM UTC
  2. PowerBuilder
  3. # 2

Hi Thierry;

  FWIW: If you were using the STD Framework, you could resolve these questions in "real time". For example:

Feel free though to extract the PB code you need to assimilate into your PB App / framework.  ;-)

Food for thought.

Regards ... Chris

Comment
  1. Thierry Garrigues
  2. Thursday, 13 April 2023 08:06 AM UTC
Hi Chris.

Thanks Chris, it's interesting and correspond to what I'm looking for.

We use PFC, do you think it is possible to easily reuse your framework in our application to have access to your profiling tools and do tests?

Regards

Thierry
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 13 April 2023 16:24 PM UTC
Hi Thierry;

You could (and are most welcome to) certainly "port" the STD framework's relevant code for these features to the PFC "extension" layer but, that would be a project on it's own (IMHO).

Regards ... Chris
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 12 April 2023 14:00 PM UTC
  2. PowerBuilder
  3. # 3

Why search for a solution if you do not know the root cause of the problem?

First, what is "a long time"? Five seconds, ten seconds, a minute, three minutes? Do all windows take a long time to open or just a select few? How many levels of inheritance are the windows using? How many controls are in the windows? Do the windows use Tab controls? If so, how many tab pages do they contain? How many DataWindow controls? Do the "slow" windows automatically perform a database retrieve/refresh when they open? How many DDDW's are in use? Are the DDDW's using Auto-Retrieve? How many rows do they contain? Is the app installed locally on each user's machine or are the PBD's accessed from a network location? Is a VPN involved? Remote desktop? Citrix? How many PBL's and how many objects are in the PBL's? Do the objects used in one poor-performing window reside in a single PBL or in many PBL's?

I'm not asking for you to supply me/us with the answers to these questions - I'm only providing you with some examples of the questions you need to be asking yourself as you consider why app performance is judged to be poor.

Roland's suggestion to utilize the Profiler tool is a good one that may help you discover the place(s) where execution time is being spent. The time and effort needed to learn how to judiciously use the Profiler and analyze the data it produces is time well spent for any PB developer.

Good luck!

Comment
  1. Thierry Garrigues
  2. Wednesday, 12 April 2023 15:35 PM UTC
Hi

Thanks for your help. The problem only affects a few windows. The first opening can take 2 to 3 seconds while the following openings are instantaneous. We have SQL traces that tell us that the problem is not related to SQL queries. This windows uses objects (userObject, dw, ds) which are placed in different pbl. UserObjects can also be contained in different pbls. The application contains a hundred libraries for a size of 120 MB.

When the application is launched, the exe takes up 70 MB. When this window is opened, the application takes up 130 MB. Close the window, frees up 10MB.

That's why I tell myself that this window loads a lot of pbd in memory the 1st time

Regards
  1. Helpful
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Wednesday, 12 April 2023 08:20 AM UTC
  2. PowerBuilder
  3. # 4

Opening windows takes a long time the first time while it is faster afterwards.

DO you mean the first window or every window in the application?

 

Comment
  1. Thierry Garrigues
  2. Wednesday, 12 April 2023 09:44 AM UTC
Thank you for this advice
  1. Helpful
  1. Roland Smith
  2. Wednesday, 12 April 2023 13:09 PM UTC
You could try using the Profiler built into the PB IDE.

Some generic suggestions:

Don't compile any large image files into the EXE. Have a PBR assigned to the library where the image is used or an empty PBL named 'images.pbl'.

Try to put the objects referenced at startup into as few libraries as possible. This limits disk reads.
  1. Helpful 3
  1. Thierry Garrigues
  2. Wednesday, 12 April 2023 15:14 PM UTC
Thank you for this advice
  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.