Hi,
Does anyone experience slow performance on DI function GetByKey with SAP B1 8.8 version? I have tested same function to load a Sales Order with 100 lines on B1 8.8 and 2007A version. It takes 7 seconds to load one Sales Order by GetByKey in 8.8 , but in 200A version, these is no delay,
Here is my code.
Dim d1, d2 As Double
Dim ORDR As SAPbobsCOM.Documents
Dim DocNum As Long
DocNum = 29
For ii = 1 To 100
Set ORDR = oCompany.GetBusinessObject(oOrders)
d1 = CDbl(Now)
Result = ORDR.GetByKey(DocNum)
d2 = CDbl(Now)
Debug.Print Result & " , " & ORDR.Lines.Count & " , " & (d2 - d1) * 24 * 3600 & " seconds"
Set ORDR = Nothing
Next ii
RESULT:
2007A:
True , 101 , 0 seconds
True , 101 , 0 seconds
True , 101 , 0 seconds
True , 101 , 0 seconds
True , 101 , 1.00000023376197 seconds
True , 101 , 0 seconds
True , 101 , 0 seconds
True , 101 , 0 seconds
True , 101 , 0 seconds
True , 101 , 1.00000023376197 seconds
Done
8.8 version:
True , 101 , 7.00000037904829 seconds
True , 101 , 6.99999975040555 seconds
True , 101 , 6.99999975040555 seconds
True , 101 , 7.00000037904829 seconds
True , 101 , 6.99999975040555 seconds
True , 101 , 7.99999998416752 seconds
True , 101 , 7.00000037904829 seconds
True , 101 , 6.99999975040555 seconds
True , 101 , 6.99999975040555 seconds
True , 101 , 7.99999998416752 seconds
Done
thanks,
David