HttpClient performamce

Posted by FrankHilhorst on 14-Jan-2019 20:40

Hi Guys,

I have done an implementation calling a rest service using the httpClient that ships with Progress.

It works but the performance is very poor.

Compared to doing an "input through" a curl command the httpClient takes 3 times as long.

Does anybody know why the Progress HttpClient is so slow or if there is some tuning that can be done about it.

The httpClient would make for a more elegant solution but with this kind of performance differences we would have to stick with shelling out through curl.

All Replies

Posted by Tim Hutchens on 14-Jan-2019 20:49

Hi Frank,

We use the ABL httpClient to call 3rd part APIs from our character application. We have noticed mixed performance, but our use case has not yet demanded us to investigate it. Sometimes the calls are extremely quick; other times they have significant lag. There are a lot of factors it could be, but the performance hasn't been bad enough and the API integration not important enough for us to track it down. I'd be interested in hearing what others' experiences are as well.

Tim

Posted by Brian K. Maher on 14-Jan-2019 20:50

Frank,
 
I recommend that you open a case with us in support and include the source code so we can help figure out the issue.
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
+1 781 280 3075
 
 
Twitter
Facebook
LinkedIn
Google+
 
 

Posted by BartMille on 15-Jan-2019 07:54

I can concur that it's about 3 times as slow as postman, fiddler, ... Both on linux & windows. We're using https if that an help.

Wasn't there already a call logged for this last year? Defect PSC00362024

Posted by Peter Judge on 15-Jan-2019 14:36

Frank,

Does the total time include converting the file on disk into a "useful" object? Or do you just use it as a longchar or memptr?

One of the areas where ABL is slower than (say) C is in processing of byte-based data. The Http Client converts the responses which are byte-based into more strongly-typed objects. This takes some time. We're working on identifying places where we can move that code into the Core/language.

Posted by FrankHilhorst on 15-Jan-2019 16:17

I have opened a case as you suggested under case number 00474558.

I was asked to attached the code I am using for the curl implementation and the http client implementation.

However when I try to attach my code and stats to the case link it doesn't allow me to do it. I think this is because I am contracting at Franklin Templeton and I am trying to use my login and nobody knows the Templeton log in.

So the stats for curl are that we can make 15 round trips in 674 milisecords

To do the same with the Progress HTTP client takes  5579 miliseconds

Since I can't attache the code for the curl and the http client implementations here and I cannot attach it to the case number either (as previously explained), if you give me an email address I will mail the code library to you.

Here are the traces for the curl test run and the http client test run below.

Curl against on premise rest service

┌────────────────────────────────────────────────────────────────────┐

│      iCnt     iETime       code reason   cErrMsg                   │

│────────── ────────── ────────── ──────── ───────────────           │

│         1         45        200                                 475│

│         2         43        200                                 475│

│         3         41        200                                 475│

│         4         43        200                                 475│

│         5         43        200                                 475│

│         6         46      ┌────── Message ───────┐              475│

│         7         47      │     iTotTime 674     │              475│

│         8         43      │ ──────────────────── │              475│

│         9         41      │         <OK>         │              475│

│        10         43      └──────────────────────┘              475│

│        11         45        200                                 475│

│        12         43        200                                 475│

│        13         44        200                                 475│

│        14         49        200                                 475│

│        15         46        200                                 475│

│                                                                    │

│                                                                    │

└────────────────────────────────────────────────────────────────────┘

4gl httpclient against on premise rest service

┌────────────────────────────────────────────────────────────────────┐

│      iCnt     iETime       code reason   cErrMsg                   │

│────────── ────────── ────────── ──────── ───────────────           │

│         1        399        200 OK                              474│

│         2        379        200 OK                              474│

│         3        403        200 OK                              474│

│         4        354        200 OK                              474│

│         5        379        200 OK                              474│

│         6        371      ┌────── Message ───────┐              474│

│         7        345      │    iTotTime 5579     │              474│

│         8        340      │ ──────────────────── │              474│

│         9        343      │         <OK>         │              474│

│        10        339      └──────────────────────┘              474│

│        11        341        200 OK                              474│

│        12        346        200 OK                              474│

│        13        394        200 OK                              474│

│        14        391        200 OK                              474│

│        15        428        200 OK                              474│

│                                                                    │

│                                                                    │

└────────────────────────────────────────────────────────────────────┘

Posted by FrankHilhorst on 15-Jan-2019 16:23

Hi Peter,

We are capturing the payload of the rest service as a longchar with the following code.

(ocContent is a longchar and the payload is usually in JSON format)

            IF TYPE-OF(oEntity, JsonObject)

                THEN DO:

                    CAST(oEntity,JsonObject):WRITE(input-output ocContent).

                END.    

            ELSE IF TYPE-OF(oEntity, WidgetHandle) THEN

                DO:

                    CAST(oEntity, WidgetHandle):Value:SAVE ("longchar",ocContent).

                END.

                ELSE IF TYPE-OF(oEntity, String) THEN

                DO:

                        ocContent = CAST(oEntity, String):VALUE.                  

                END.        

                ELSE DO:

                        ocContent = oEntity:ToString().  

                END.          

          END.

This thread is closed