1

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.

asked Nov 17, 2020 at 9:07

1 Answer 1

3

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
answered Nov 17, 2020 at 9:22

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.