Skip to Content
0

OData JSON parser performance

Nov 25, 2016 at 10:44 AM

239

avatar image

Dear All,

I am facing performance issue when trying to push 30K(Thirty thousand) records from Gateway into browser applications(UI5). Even though the JSON file size is 0.5 MB but still it takes more than 1 minute to get the response in the browser. Standard SAP JSON/XML parsing classes are taking more time to convert internal table into JSON. Attached screen-print is the result of performance trace taken for the OData service.

Gateway component: SAP_GWFND SP15 running on NW 7.4(Co-Deployment)

Note: There are no performance issues happening in SELECT queries/BAPI calls.

Appreciate your help.

Regards

Prabha

trace-results.png (392.6 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

avatar image
Former Member Nov 28, 2016 at 05:52 AM
1

Hello Prabaharan,

According to me 30K records is definitely huge number and would take time to come from back-end to your application.

So limiting the data volume would be the best way and simple to handle.

Regards,

Ashwin

Share
10 |10000 characters needed characters left characters exceeded
Nabi Zamani Nov 29, 2016 at 01:30 PM
1

Unless you have really really really good reasons for sending 30.000 items to the browser it's a very bad approach to do that. You did not explain why you need 30k items on the frontend - so what's the reason? What do you do with all the data on the frontend? Are you trying to display the items all at once in a table or so? Are you aware that displaying this amount of data on desktop browsers is painful enough while it's most probably absolutely inacceptable on mobile browsers/devices?

Instead you should use paging by using everything OData ($top and $skip) and SAPUI5 (i.e. v2.ODataModel bound to sap.m.Table) offer you. If you check the API docs of sap.m.Table as an example you will find out that a good number for a page might be 100. If you would really like to display 30k items let's say in a table this means that SAPUI5 will clone the template you have passed to your binding for the items aggregation 30k times - this would be insane as this consumes lots of resources and takes time! Furthermore, without knowing more I guess that the parsing of JSON is not the biggest issue - it's the cloning!

Best, Nabi

Share
10 |10000 characters needed characters left characters exceeded
Prabaharan Asokan Nov 28, 2016 at 05:29 AM
-1

Dear All,

Please shed some lights here regarding above query?

Regards

Prabha

Share
10 |10000 characters needed characters left characters exceeded
Prabaharan Asokan Dec 01, 2016 at 07:13 AM
-1

Hello Nabi & Ashwin,

Thanks for your response.

I am trying to download the functional locations and equipment in a mobile app.One of the parent FLOC contains close 30K descendants(even after applying the filter like plant,work center, user id) to it which will be saved in the device to access when there are network connectivity. Hope this gives some insights and answers to your questions.

Regards

Prabha

Share
10 |10000 characters needed characters left characters exceeded