Class Performance - Expected?

Posted by Roger Blanchard on 31-Mar-2019 14:15

11.7.4..just wondering if this is expected. I know there is a performance hit with ABL classes but to this extent?

If we call the following 1000 times it will take 7348ms!!

(NEW Osprey.PointOfSale.PosTransaction.UpdateMediaTotal (oTransactionTotals)):PerformUpdate (DATASET dsPosTransaction BY-REFERENCE,
                                                                                                                                                                 iMediaType,
                                                                                                                                                                 iRecNum,
                                                                                                                                                                 dTenderAmount,
                                                                                                                                                                 NO,
                                                                                                                                                                 dECCAmount,
                                                                                                                                                                 cCardType
                                                                                                                                                                ).

If we do the same with a .p it takes only 166ms.

RUN Osprey\PointOfSale\PosTransaction\UpdateMediaTotal2.p (oTransactionTotals,
                                                                                                        DATASET dsPosTransaction BY-REFERENCE,
                                                                                                        iMediaType,
                                                                                                        iRecNum,
                                                                                                        dTenderAmount,
                                                                                                        NO,
                                                                                                        dECCAmount,
                                                                                                        cCardType).

If we create an instance of the class only once and call the PerformUpdate METHOD 1000 times it takes 3697ms. 

oMediaTotal:PerformUpdate (DATASET dsPosTransaction BY-REFERENCE,
                                               iMediaType,
                                               iRecNum,
                                               dTenderAmount,
                                               NO,
                                               dECCAmount,
                                               cCardType
                                              ).

All Replies

Posted by bronco on 31-Mar-2019 14:39

au contraire what I expected...

Posted by Mike Fechner on 31-Mar-2019 14:40

What startup parameters have you used?

-D
-reusableObjects
-q

???

Does your class reference other types? Super class? Interfaces? Parameter objects?

Sent from Nine

Von: Roger Blanchard <bounce-rblanchard@community.progress.com>
Gesendet: Sonntag, 31. März 2019 16:16
An: TU.OE.Development@community.progress.com
Betreff: [Technical Users - OE Development] Class Performance - Expected?

Update from Progress Community
Roger Blanchard

11.7.4..just wondering if this is expected. I know there is a performance hit with ABL classes but to this extent?

If we call the following 1000 times it will take 7348ms!!

(NEW Osprey.PointOfSale.PosTransaction.UpdateMediaTotal (oTransactionTotals)):PerformUpdate (DATASET dsPosTransaction BY-REFERENCE,
                                                                                                                                                                 iMediaType,
                                                                                                                                                                 iRecNum,
                                                                                                                                                                 dTenderAmount,
                                                                                                                                                                 NO,
                                                                                                                                                                 dECCAmount,
                                                                                                                                                                 cCardType
                                                                                                                                                                ).

If we do the same with a .p it takes only 166ms.

RUN Osprey\PointOfSale\PosTransaction\UpdateMediaTotal2.p (oTransactionTotals,
                                                                                                        DATASET dsPosTransaction BY-REFERENCE,
                                                                                                        iMediaType,
                                                                                                        iRecNum,
                                                                                                        dTenderAmount,
                                                                                                        NO,
                                                                                                        dECCAmount,
                                                                                                        cCardType).

If we create an instance of the class only once and call the PerformUpdate METHOD 1000 times it takes 3697ms. 

oMediaTotal:PerformUpdate (DATASET dsPosTransaction BY-REFERENCE,
                                               iMediaType,
                                               iRecNum,
                                               dTenderAmount,
                                               NO,
                                               dECCAmount,
                                               cCardType
                                              ).

View online

 

You received this notification because you subscribed to the forum.  To stop receiving updates from only this thread, go here.

Flag this post as spam/abuse.

Posted by Roger Blanchard on 31-Mar-2019 14:51

For this small test we were using the following for startup.

-debugalert -inp 32000 -tok 4000 -rereadnolock -s 1024 -mmax 65534 -nb 255 -D 100000 -zn -errorstack -reusableObjects 100000 -q

As far as the class all it references is an include file that has the PDS definition. This PDS is setup as REFERENCE-ONLY.

Posted by Roger Blanchard on 31-Mar-2019 15:58

Okay, I guess it helps to compare apples to apples.

The UpdateMediaTotal2.p we created to compare performance had no logging as it was all removed for this test. The classes still had some logging enabled which is what was slowing down the test.

After removing the logging the results are;

Calling .p 1000 times - between 80-100ms

Creating instance of class and calling METHOD 1000 times - between 20-25ms which is faster than calling the .p.

NEWING class and calling METHOD at same time - between 100-120ms

Posted by cverbiest on 01-Apr-2019 08:00

For performance tests I also like to add the -rr parameter which disables the compiler.

That way you can be sure no on the fly compilation is influencing the results.

> Creating instance of class and calling METHOD 1000 times - between 20-25ms which is faster than calling the .p.

That should be compared to persistently running a .p and calling an internal procedure in that .p

Posted by Roger Blanchard on 01-Apr-2019 12:18

> That should be compared to persistently running a .p and calling an internal procedure in that .p

Absolutely...thanks.

This thread is closed