Consume REST service performance

0
hi everyone, currently i am facing a problem of calling api through rest service. Specifically: I have an api that retrieves all order information of customers who are logged in (about 25 orders). I run on postman api tester, total time to finish api is 5.25s - 6s. However, when running the app locally (viewing the app through Make It Native 9) the total time to get the results returned from the api is 8s. Even worse, when exporting the apk file and installing it directly on a real device, the total running time is 15s - 20s and maybe more. Microflow process like the picture below:   I searched on the docs about Consume REST service, but couldn't find any results. Any ideas are appreciated. Thanks!
asked
2 answers
0

Hi Kien,

Doing it from the mobile will always be slower than Postman. because the mobile will call the Mendix server and the Mendix server will call the API then will return the results.

Postman → API Server

Postman ← API Server

-------

Mobile → Mendix Server

Mendix Server → API Server

Mendix Server ← API Server

Mobile ← Mendix Server

 

Also have a look at the logic that you implemented in the Nanoflow usually mobile phones are slow in processing the data, if this data doesn’t change frequently then try to call the API fewer times and when the user needs the data just get it from the Mendix server.

answered
0

The increased time in mendix could be attributed to the size and complexity of the returned objects. The rest call in mendix not only retrieves data but also parses it and create internal mendix objects for further processing.

 

whether that is the root cause here or not is hard to conclude without example of the result from postman.

 

answered