cancel
Showing results for 
Search instead for 
Did you mean: 

Magento Web API performance Issue

Magento Web API performance Issue

HI!

 

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/

 

Thanks!

2 REPLIES 2

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 

Re: Magento Web API performance Issue

Hello @denis_lee,

 

I think many factors can affect your web API response time. I would suggest that check all the errors in your API. If found any, solve that.

The category data you are loading might be above the server capacity. Check out that too.

Try to pass few data and check out the response time.

 

Hope this will work for you.

 

Click KUDOS and accept as a solution.

Thank you!