Guys, i'm trying to convert my project from 19.1 to 20.0, it's been a very painful process, i really need tips from you as experts.
19.0/19.1 = all works "good"
20.0 = when my project webapp.exe is loading in memory, it stop to grow the memory usage and keep using cpu for a while <- this is not an expected behavior
the problem is that i use 18 apps in pool, and because the complexity of my project some times i get deadlocks that cause a overload sessions and all my user get stuck, i don't know where it comes from, so i need to kill the process under WASA, and it cause the "reload" of my webapp, when it happen at least 3, sometimes 4~5 webapp.exe start loading into memory at same time, and all others sessions need to "WAIT" this webapp.exe loading get finished.
this is not what i expected from my project, but is how i keep my projet alive.
back to the problem:
i made a code review on source and i figure out the file cWebControlLocator.pkg from the framework is killing my loading time process (i means when webapp.exe start loading until finish)
in procedure SortWebControlArrays there is a sortarray that get all object names and sort them, the problem is my project have more than 46k objects, lol
i made some tests with weborder, dropped a button with a random array and try to sort and the command sortarray takes many more time that 19,1-.
the results:
19.1
50001 records in a string array = instant
50001 records in a integer array = instant
20.0
50001 records in a string array = 40 seconds
50001 records in a integer array = instant
cause it is on framework process i think that is not related with DB layer right? (unicode, oem etc...)
i tried on 32 bits and 64 bits, same results
and ofc if i remove the sortarray the project fails on load.
so, why this happen with sortarray command? (probably related with unicode things)
nobody noticed this big decreased performance from sortarray with strings?
any workaround or anything that can i do to avoid this loading time?
sample:
Code:
Object oSortButton is a cWebButton
Set psCaption to "Sortarray"
Set piColumnSpan to 2
Procedure Onclick
Integer i
String[] aWebControlNames
Integer[] iWebControlNames
For i from 0 to 50000
Move (Random(1000000)) to aWebControlNames[i]
Loop
Move (SortArray(aWebControlNames)) to aWebControlNames
For i from 0 to 50000
Move (Random(1000000)) to iWebControlNames[i]
Loop
Move (SortArray(iWebControlNames)) to iWebControlNames
End_Procedure
End_Object