I have created some custom rest api's and using Magento's default rest api's.

I want to reduce the loading time of the api, as I have custom api's too so the request time and response time is quite more than usual.

Is there any way or solution to this scenario. that will be a great help.

Thanks in advance.

1 Answer 1


kindly follow these steps while developing:

  • do not use addAttributeToSelect(*), only select attributes which you need.
  • do not use ObjectManager
  • Use the Magento\Framework\Data\Collection class to retrieve a collection of filtered objects instead of directly querying the database.
  • Avoid creating helper classes
  • use caching practice in GET API calls
  • to boost your APIs you can use the following module: https://github.com/magespecialist/m2-MSP_APIEnhancer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.