1. Monica Petersen
  2. PowerBuilder
  3. Friday, 21 May 2021 15:53 PM UTC

Hi All,

I converted our app to PB2019 R3 build 2703 this week, and noticed it was freezing up whenever I closed a large report.  Looking at task manager, the app was taking a large portion of the CPU cycles while appearing frozen.  When the CPU usage subsided, the app became responsive again.  This was all happening after the report window had closed.

I ran a simple test with the PB sample database and three different sized datawindows: small (100 rows), medium (1,100 rows), and large (8,200 rows), and saw the same behaviour.

When I close the small datawindow, the CPU increases for 2 seconds and then goes back to zero.

When I close the medium datawindow, the CPU increases for 7 seconds and then goes back to zero.

Closing the large datawindow causes the CPU to increase for 95 seconds, during which the application is frozen.

I've tried this with a sql server database, both with the native SNC driver and the new MSOLEDBSQL driver, and then with the 'PB Demo DB V2019R3' sample database, and seen the same lag each time.  It occurs both in the IDE and when the app is deployed.

Has anyone else experienced this?  If so, how did you fix it?

Thanks in advance,

Monica.

p.s. I've attached the test project I put together.

 

Attachments (1)
Monica Petersen Accepted Answer Pending Moderation
  1. Friday, 21 May 2021 16:17 PM UTC
  2. PowerBuilder
  3. # 1

No, I don't, and adding that certainly helped.  Now the lag is only 17 seconds when I close the large datawindow, which is acceptable.  I'll add that to our ancestor code.

Thanks!

Comment
  1. Chris Pollach @Appeon
  2. Friday, 21 May 2021 16:36 PM UTC
Hi Monica;



If your large DWO is housed within in a DC .. then I would also suggest adding this line first in the new destructor code ...

=> THIS.SetReDraw ( FALSE)



If your large DWO's are housed within a DataStore, I would create a custom PB.ini and deploy it with your App EXE, as follows:



[DataStore Behavior]

; No = do NOT use MS-Window handles in DS processing (Default is yes). "No" gives much better performance!

UseHwnd=no



HTH further. Regards ... Chris

  1. Helpful
  1. Monica Petersen
  2. Friday, 21 May 2021 19:30 PM UTC
Sounds like a good idea regardless! I'll add that too.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 21 May 2021 16:03 PM UTC
  2. PowerBuilder
  3. # 2

Hi Monica;

  In your DW Control and/or DataStore where you have the large DWO running, do you clear the DC/DS like I do on the Destructor event (for example) ...

  • THIS.Reset ()  // Clear DWO buffers
  • THIS.DataObject = "" // Release DWO
  • Yield() // Let PBRT complete the cleanup

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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.