1. Mary Jane Foster
  2. PowerBuilder
  3. Monday, 28 March 2022 19:08 PM UTC

Hello PB Community!

Since migrating from PB2017 to PB2021 we've begun experiencing what seems to be an issue with memory with our executables (which are 64 bit BTW).  We have a 3rd party image display system sitting on an OLE object that, after time, the PowerBuilder buttons and fonts become larger, and bold, and the images start to not come up, or some do and some don't.  So, I started monitoring the memory (what little I know about it is about ready to be evident) in the Resource Monitor.    What I see happening is when we open the the window the thread count increases by 6 or 7, and when we close said window (with objects being destroyed and garbage collection, etc.), the thread count only diminishes by 3.  

Once that thread count reaches between 200 & 250 (rough numbers, it varies I'm sure because other things are happening on the system) we start experiencing the odd behavior and the only way to remedy it is to completely shut down and restart the application.

I've gone back to our PB 2017 built application and monitored the same activities and the thread count behavior is what you would expect it to be.  Increases by 3, then decreases by 3 when we close the application.  I have yet to be able to get the thread count over 15.  No code changes were made prior to the migration, so the code base is identical.

Any thoughts, suggestions, offers of tequila would be appreciated!  Truly.

Happy Monday!

MJ

Mary Jane Foster Accepted Answer Pending Moderation
  1. Monday, 1 August 2022 12:08 PM UTC
  2. PowerBuilder
  3. # 1

Hi All and thank you for the great suggestions.

Here are the things we have tried, and the results:

  • Image Gallery (ranked in worst to best option so far)
    • Picture List Box - can only show one image per line
    • ListView Object
      • Too slow to render more than 500 images
      • Images are fuzzy
    • Web Control
      • Display is inconsistent; sometimes it does not display all the images and requires a refresh
      • Image quality is good
      • Speed is slower - both the speed to draw initial page and the speed to draw our larger galleries
    • Dynamically create gallery using custom user object 
      • Image quality good
      • Speed is slower when greater than 800 images
    • N-Up datawindow - Display as Picture
      • Speed is good, even on >7K images!
      • Images are poor quality.  Thumbnails are fuzzy and not crisp
        • Tried using larger images
        • Tried using smaller, more optimized images for the gallery size
        • Tried making size displayed bigger - helped marginally, but still fuzzy
        • We believe this is how PB converts the image when using this feature and it looks like we have no control over this, as it is just a checkbox.  Is there anyone out there who knows a way around this?  We believe it is converting the images to a 256 .bmp.

 

Happy Monday!

MJ

Comment
  1. Miguel Leeuwe
  2. Wednesday, 3 August 2022 14:45 PM UTC
When looking at your exported dw syntax, you have them set to PBUnits (0). "datawindow(units=0"
  1. Helpful
  1. Mary Jane Foster
  2. Wednesday, 3 August 2022 16:22 PM UTC
Hello Miguel:



We reset to Pixels as you suggested and unfortunately we aren't seeing a different - the images remain fuzzy.



I will take all the suggestions we can get... what else have you got for me? :-)



MJ
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 3 August 2022 20:31 PM UTC
check what the expression to size the images are doing. Try to not set the sizes dynamically?

Can you make all the images have the same size?

Use the attribute "Originalsize" to first have the image adapt itself to its optimal size, but after that un-check that box and then save the datawindow. I've seen fuzzy images when you let it be checked.

regards,

MiguelL
  1. Helpful
There are no comments made yet.
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 29 March 2022 08:44 AM UTC
  2. PowerBuilder
  3. # 2

Hi Mary,

I suspect the issue may have something to do with PB 2019 R3 starting to support UI Automation. So I suggest you try this:

1. Open the PB IDE pb.ini file (C:\Users\%username%\AppData\Local\Appeon\PowerBuilder 21.0\pb.ini). Add ACCESSIBILITY=0 under the Data Window node and then try again:
[Data Window]
ACCESSIBILITY=0

2. If you compile your application to an EXE to run, then you need to add a pb.ini file to the directory where your PBapp.exe resides, and this file contains the following content.
[Data Window]
ACCESSIBILITY=0

If the issue remains, I suggest you submit a bug to the Appeon Support System(https://www.appeon.com/standardsupport/newbug) and upload a small reproducible case there for our analysis.

Regards,
Ken

Comment
  1. Ken Guo @Appeon
  2. Thursday, 31 March 2022 01:52 AM UTC
Hi Mary,



From experience, a meeting right now does little to solve the problem, and providing a small, reproducible case for developers to debug is the most effective way. So I suggest you:

1. Create a small case. Use this OLE in a window and see if it’ll also make the thread count increase.

2. Submit a bug to the Appeon Support system as the issue can be better tracked there.



Regards,

Ken
  1. Helpful