1. Gimmy Susan
  2. PowerBuilder
  3. Monday, 11 November 2024 16:13 PM UTC

 

Hello everyone
I have slowdown problems with opening dddw
Ecosystem:
windows11
pb2022r3 (build 3391), but I have the same problem with pb2019r3
pfc

If I open many windows (windows with many fields and dddw) when I click on the dddw to open them, they open late. The positioning on the field happens immediately, but then there is a significant wait before the list of dddw values ​​is displayed. (I have gotten to have waits of 3 seconds).
It seems that if open windows increase (complex windows: many fields, many dddw, many tabpages) the response time of opening the dddw increases proportionally.
You understand that in an MDI application it is not nice to limit the opening of windows and this causes strong slowdowns.

I'll start by saying that
•⁠ ⁠RAM is not in crisis
•⁠ PROCESSOR is not in crisis
•⁠ ⁠I checked with debug and the only event that fires is the click and it has no code that can interfere. I even deleted all the code to make sure there were no recursive ones that cause problems.
•⁠ ⁠dddw are loaded when the window is opened and not when it is clicked.

 

thanks in advance for your reply

Gimmy Susan Accepted Answer Pending Moderation
  1. Wednesday, 13 November 2024 15:13 PM UTC
  2. PowerBuilder
  3. # 1

Here is a further analysis.

Summary of the tests performed on the image.

- In the column you find the environment on which the test was done: from Powerbuilder (version/build) or exe (build)
- in the row you find the measurement steps: the windows opened to measure the speed (in this specific case up to 7 windows).

At the intersection between row and column you find how many handles are used.

The analysis shows that when approaching 6000 handles the system begins to slow down annoyingly.
Further checks show that, in addition to the slowdown in the opening of the dddw, even normal activity (switching windows, opening menus, etc.) slows down.

Does anyone have information on the fact that >6000 handles the system slows down annoyingly?

 

Thanks in advance for your answers

Attachments (1)
Comment
There are no comments made yet.
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Tuesday, 12 November 2024 10:55 AM UTC
  2. PowerBuilder
  3. # 2

Are you using Themes? If so is it better without the themes being applied?

Comment
  1. David Peace (Powersoft)
  2. Tuesday, 12 November 2024 15:03 PM UTC
I guess that means that you are not using Themes, so that eliminates that overhead.

Is this occurring on all machines or just some?
  1. Helpful
  1. Gimmy Susan
  2. Wednesday, 13 November 2024 08:22 AM UTC
yes, all machines
  1. Helpful
  1. David Peace (Powersoft)
  2. Wednesday, 13 November 2024 08:58 AM UTC
I'm sorry, I have no ideas or suggestions. We have some pretty heavy Apps with DDWs and not experienced this. From what you describe it is clearly a lag in rendering the DDW as it paints the rectangle then waits to paint the data. I think you may have already identified the cause and that is one of resources being used when lots of windows are open.
  1. Helpful
There are no comments made yet.
Gimmy Susan Accepted Answer Pending Moderation
  1. Tuesday, 12 November 2024 09:52 AM UTC
  2. PowerBuilder
  3. # 3

Further tests show that if we approach 7000/8000 handles the system has that problem.
Below is the code we use for the test.
we also noticed that when we reach 10000 the program crashes.

 

Could it be? Does it happen to anyone?

 

====================================================================

Function long GetCurrentProcess () Library "kernel32"
Function long GetGuiResources (ulong hProcess,  long  uiFlags) Library "user32.dll"

long ll_guiresource, llguiobj
ulong        hdlProcessHandle
if isvalid(inv_statusbar) then

    hdlProcessHandle = GetCurrentProcess()
    llguiobj = GetGuiResources(hdlProcessHandle, 1)
    inv_statusbar.of_modify("handle", " " + string (llguiobj) + " / 9999")
    
    if llguiobj > 8000 then
        messagebox('Avviso', 'Stai raggiungendo il limite delle finestre aperte, è opportuno chiudere alcune finestre!', Exclamation!)
    end if
end if
===========================================================================

Comment
  1. Gimmy Susan
  2. Wednesday, 13 November 2024 08:23 AM UTC
hi Mike

can U say something about that parameter ?
  1. Helpful
  1. Gimmy Susan
  2. Wednesday, 13 November 2024 15:27 PM UTC
Hi @Chris



[cit]

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\GDIProcessHandleQuota

Range: 256 - 65,536. Default value: 10000

[end cit]

You are telling me that I can change the value in the register by changing the limit of 10000.

Simply with that registry key? Risks of this change?









[cit]

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\USERProcessHandleQuota

Range: 200 - 18,000. Default value: 100

[end cit]

As default value do you mean ? If the limit is 200-18000, how can the default value be 100?

Can this be done per user only? Simply with that registry key? Risks of this change?



Sorry for these seemingly trivial questions, but I have no expertise in this.



Thanks in advance



  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 13 November 2024 15:54 PM UTC
Hi Gimmy;

I have done this before quite a few times and it has a very low risk to the machine's stability in my experience.

I would first suggest though trying this change on one machine that has the issue to see if that alleviates the problem.

Then you can decide how to proceed forward from there for the rest of the machines if applicable.

Regards .. Chris
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Monday, 11 November 2024 20:42 PM UTC
  2. PowerBuilder
  3. # 4

"when I click on the dddw to open them, they open late"

 

I missed this when i first read it.  so it isn't the retrieve of the datawindows that is  your issue, it is when a user clicks on the dddw that it does not display the drop down until a delay?

Comment
  1. Gimmy Susan
  2. Tuesday, 12 November 2024 09:23 AM UTC
Hi Mike.

yes

after clicking on the dddw the focus moves correctly and immediately, but the curtain goes down with an annoying delay
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Monday, 11 November 2024 17:04 PM UTC
  2. PowerBuilder
  3. # 5

Do all DDDW's exhibit this issue, or only a few?

Resources are finite. Also, the more "things" PB has to keep track of internally, the greater I would expect the impact of overhead of managing all of the objects to increase.

Can the latentcy your app is experiencing be attributed to repeated data retrievals of large amounts of data in the DDDW's? 

Approximately how many rows in the DDDW's?

How many columns in the DW's?

How many rows in the DW's?

How many windows are open?

32-bit or 64-bit?

Comment
  1. Gimmy Susan
  2. Tuesday, 12 November 2024 09:37 AM UTC
Interesting questions.

The tests say that:

- all dddw have the same problem. even those with only 3 items.

- we do not have retrieves that come into play

- the dw is singlerow, the dddw gives problems even with 3 items.

- the problem occurs both in 32 and 64 bit

- the number of open windows gives some suggestions. eg: if I open 20 'simple' windows I have no problems. If I open 5 very populated windows of objects it gives problems.



[cit]

Resources are finite. Also, the more "things" PB has to keep track of internally, the greater I would expect the impact of overhead of managing all of the objects to increase

[end cit.]

maybe the problem is here. I do further tests
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 11 November 2024 16:35 PM UTC
  2. PowerBuilder
  3. # 6

Hi Gimmy;

  • Is this when running the App from the IDE, EXE or both?
  • Does this only happen on your development machine?
  • Do other developers/ App users have this issue?

Regards ... Chris 

Comment
  1. Gimmy Susan
  2. Tuesday, 12 November 2024 09:39 AM UTC
- It happens in both IDE and EXE

- It also happens in my development machine (I use intel I9+128RAM)

- all users and all developers have the same problem
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Monday, 11 November 2024 16:23 PM UTC
  2. PowerBuilder
  3. # 7

are you caching the dddw values? 

do you have autoselect on, or are you manually retrieving them (in a posted event or triggered)?

do you retrieve all of them regardless of whether the user can see them (you mention many tab pages)?

Comment
  1. Gimmy Susan
  2. Tuesday, 12 November 2024 09:40 AM UTC
- no

- manually on windows open

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