1. Simone Olianti
  2. PowerServer 2020 or older (Obsolete)
  3. Friday, 24 January 2020 09:18 AM UTC

Hello, i'm creating a web application with PowerBuilder 2019. Everything working fine but i would like to tune it up to improve performance so i started to follow the precious advices in the appeon performance tuning guide.
I have a nvo that i've alredy optimized its code, but it's still quite slow so i would like to understand how to speed up its execution over wan. It contains multiple statements that result in server calls so i guess it would be a good pratice to partition it server-side.
Following the manual i should do something like this

n_order ln_order
long ll_rc
dw_1.Retrieve()
dw_1.SetSort("#1 A, #2 D")
dw_1.Sort()
ll_rc = myconnect.CreateInstance(ln_order, "PB_pkg_1/n_order")
if ll_rc = 0 then
ln_order.of_UpdateOrderPrice(arg_orderid)
end if

but i'm not sure if it is the right approach on my environment and how to define the myconnect object
and probably i am missing something:

long ll_rc
uos_gendoc_web u_genera
connection myconnect
myconnect = create connection  
myconnect.connectstring= "ConnectString='DSN=startdb;UID=dba;PWD=sql',DelimitIdentifier='Yes';EnabledLocalDB='false'"

ll_rc = myconnect.ConnectToServer()
IF ll_rc <> 0 THEN  
    MessageBox("Connection failed", ll_rc)  
END IF
ll_rc = myconnect.CreateInstance(u_genera, "PB_pkg_1/u_genera")
IF IsValid(u_genera) = FALSE THEN   
    Messagebox('','create instance failed')  
End if
if ll_rc = 0 then
    ll_ret = u_genera.wf_genera_doc(str_doc)    
end if

i don't get a connection failed, but it looks like the createinstance fails since i get an error 10014
this is the AppeonServerLog:


873:3 [20-01-24 10:01:08] [AXDispatcher (GetHeader)] Header-pt:0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0
873:3 [20-01-24 10:01:08] Header-protocolMode:
873:0 [20-01-24 10:01:08] [JRouterImpl (Call())] returnObject=ReturnObject [ Code=10014, Message=Internal error. Please contact the system administrator., Exception=, ReturnValue= ]
875:3 [20-01-24 10:01:08] [AXDispatcher (doPost)]
875:3 [20-01-24 10:01:08] =======================INVOKE FINISHED==========================================
875:3 [20-01-24 10:01:08] Input time < 15ms; Process and output time < 15ms; Total time < 15ms.
875:3 [20-01-24 10:01:08] ================================================================================

any ideas?
tia,

simone

Accepted Answer
Marco Meoni Accepted Answer Pending Moderation
  1. Friday, 24 January 2020 18:17 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # Permalink

Hi Simone,

from your code it is not clear where the multiple server calls are.
I don't see the multiple retrieve/update etc..
In general, whenever you have network chatter code, you can speed up PS performance by grouping server requests:

https://docs.appeon.com/appeon_online_help/pb2019/appeon_performance_tuning_guide/ch05s05.html

What kind of objects are uos_gendoc_web and n_order, and what server are you connecting to?

Do you have the chance to migrate your NVOs as C# Web API using Appeon SnapDevelop and SnapObjects?
At that point your PS Web app will speed up, see e.g. here below (minute 35'40")

https://www.youtube.com/watch?v=ZMuByQTq43c

Best,

.m

P.S.

Please notice ConnectToServer always returns 0 in PS Web.

Comment
  1. Simone Olianti
  2. Saturday, 25 January 2020 09:44 AM UTC
thank you Marco, using the grouping server requests did the trick
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 24 January 2020 19:25 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hi Simone;

   This is very confusing why you are using the old "Connection" object for the NVUO. This looks like old EAServer logic?

Regards ... Chris

Comment
  1. Simone Olianti
  2. Saturday, 25 January 2020 09:47 AM UTC
yes, my fault. i was just following the appeon performance tuning guide about partitioning and didnt understand it was an easerver example since i have no experience about it
  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.