Showing results for 
Search instead for 
Did you mean: 

Magento Web API performance Issue

Magento Web API performance Issue



Could you please tell me what kind of factors will affect the response time of Web API, it seems my Magento 2 get slower over the past few months than before. 

And also want to know why the Magento 2 gets below api need to take a longer time than other endpoints:

https://[store domain]/[website name]/index.php/rest/[store name]/V1/categories/




Re: Magento Web API performance Issue

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 post: Magento 2 API