cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with OCC data mapper

pachoudhary
Explorer
0 Kudos
485

Hi All,

The data mapper is taking too long to convert the data to DTO and give the response back. This is happening only the first time an API is called, and then it responds very quickly.

Let me know if anyone has faced the same.

Accepted Solutions (0)

Answers (1)

Answers (1)

alemasetto
Participant
0 Kudos

Are you sure the issue is at mapper level? What if you open Dynatrace -> distributed traces and verify every step behind that call? Perhaps there is another bottleneck.

If the issue is at datamapper level, try to optimize the data mapping process to make it more efficient, for example by reducing the amount of data being processed. For instance, map only the values you need (by means of "fields" query param) instead of fields=FULL
Tip: Try to manually call the API (with curl or another client) and test each single field; verify if you always see the latency or just for specific values.
Check also your populators (Model -> Data), are they fast as expected?


SAP Commerce Cloud uses Orika, check also this page https://orika-mapper.github.io/orika-docs/performance-tuning.html

pachoudhary
Explorer
0 Kudos

Hi Alessandro,

I checked Dynatrace and below is the stack trace for the same. Some how thread execution when mapper class is called for the first time is taking time.