1. Joe Hess
  2. PowerBuilder
  3. Thursday, 22 July 2021 17:23 PM UTC

I'm testing out the PowerClient. Cool idea, but I'm struggling with performance. As an example, my invoice window pops right open when I run with PBDs. Using PowerClient, the window took almost 10 seconds to open the first time. Subsequent times, it takes about 5 seconds.

Any advice on how to improve performance?

Thanks

Joe

Accepted Answer
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 22 July 2021 17:57 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Joe,

PowerClient is just client/server but just different app installation method.  The runtime performance should not be noticeably slower... definitely not by many seconds as you experienced.

I suggest to try the troubleshooting steps Chris mentioned because those are some differences in your app installation using PowerClient vs. traditional method.  But still, I cannot imagine those things adding so much overhead that you experienced.

If after these basic troubleshooting and you can reproduce the issue on more than one machine, then please open a support ticket.

Thanks,
Armeen

 

Comment
  1. Joe Hess
  2. Friday, 23 July 2021 01:13 AM UTC
Nothing seemed to help. I submitted a support ticket.



Thanks for the response,

Joe
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 19 August 2021 15:10 PM UTC
You're very welcome. Appeon support team will take a look.
  1. Helpful
There are no comments made yet.
Joe Hess Accepted Answer Pending Moderation
  1. Thursday, 22 July 2021 19:06 PM UTC
  2. PowerBuilder
  3. # 1

Thanks, Chris.

I did not have the P-Code files encrypted. I did add two compressed packages. One was the Themes folder. The other was a set of DLLS. I just moved them out to uncompressed.

For the deployment, I set it to download files as necessary. The application is very large. I fear downloading all files will take a long time. I can try it. We have gig connections between the servers. However, if I'm access the same window, the files should already be there.

Joe

Comment
  1. Joe Hess
  2. Friday, 23 July 2021 18:13 PM UTC
Hey, Chris.



I think I narrowed this down. You can pass this information on to support.



I use query mode very heavily in the app. I first figured out the performance problem happens when moving a datawindow into query mode. After some more debugging, I was able to isolate a particular datawindow that was especially bad. As a test, I created a window, added a datawindow control and assigned the datawindow object. In the Open event, I put the datawindow into query mode. The window took 8-10 seconds to open.



Two important things. I use themes and I use a lot of expressions in datawindows. The expressions are usually for protecting fields. If the datawindow is in query mode, I will enable column objects. If the datawindow is not in query mode, I will enable/disable the column objects based on other criteria. I also change the background color of the columns so they appear disabled. I did not see a way to apply a theme color dynamically in a datawindow. My work-around was to put computed columns in the header of the datawindow that called a function which returned the appropriate color. The functions just returned color values that were loaded at the start of the app. For example, I had a computed column called disabledColor. The expression was f_DisabledColor() which returned the color I wanted based on theme. The background expression would reference the value of the computed column (IF(DESCRIBE("datawindow.querymode"='yes'), enabledColor, disabledColor)).



Long story short, I put constants in the computed columns and everything worked perfectly. My guess is the computed columns are evaluated every time they are referenced in an expression. In query mode, this might be times 20 for each row. My work-around was probably not the best, but there still is a very significant difference between the behavior of PowerClient and PBDs.



I hope this helps. I can probably put together a quick app for support to play with if you want.



Thank you for all you do,

Joe
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 23 July 2021 18:28 PM UTC
Hi Joe ... Hmmm ...

QueryMode should be lightening fast. If not, that would be a bug.

Themes does have more overhead though at Window/Control "paint" time.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Friday, 23 July 2021 18:36 PM UTC
Hi Joe, Really appreciate you sharing your analysis and the solution. if you don't mind, we would love to have a quick app. Please open a support ticket: https://www.appeon.com/standardsupport/newbug Thank you very much for your help to make PowerBuilder great!!!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 22 July 2021 17:41 PM UTC
  2. PowerBuilder
  3. # 2

Hi Joe;

  In your PC deployment Project ... did you:

  1. Check the "Encrypt all the compiled P-Code files"? If so, that would slow the App down on the 1st iteration for sure.
  2. Place many files are under the "Compressed Packages" section vs "Uncompressed Packages" section in the "External Files" tab page?
  3. In the "Client Deployment" tab page - did you specify the "Download App Files As Necessary" or "Download All App Files at Start-up" option?

Regards .. Chris

Comment
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.