Answer the question
In order to leave comments, you need to log in
Data conversion rate from API?
I get an array of goods from the back (15 pieces), but the format of the received data does not quite suit me, so I throw the data into an adapter that converts the data into the form I need. The conversion takes from 0.01ms to 3.5ms. So the question is - is it normal to spend up to 3.5ms on such operations or is it better to fix the back so that it sends it right away in the right format?
Or what are the best practices in this case?
Answer the question
In order to leave comments, you need to log in
it is normal to spend up to 3.5ms on such operations
The difference in processing most likely depends on the processor load, so I don’t think it’s a crime. The back is not obliged to give the format in a form convenient for you. Format conversion is generally absolutely normal because it is the basis for the existence of api, except for the moments when the BFF approach is used, and even then not always
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question