wp-graphql / wp-graphql-woocommerce

Add WooCommerce support and functionality to your WPGraphQL server
https://woographql.com
GNU General Public License v3.0
642 stars 130 forks source link

The API is too slow, is there any way to speed it up? It takes up to 4.5s to query 9 products. #837

Open sheinid opened 9 months ago

sheinid commented 9 months ago

Describe the bug I use woographql for my headlsess wp e-commerce website. And it takes up to 4.5s to query even a small amount of products.

To Reproduce Steps to reproduce the behavior:

  1. Go to website
  2. Search the "api" request in the network tab
  3. See the enormous loading time

Expected behavior I want to speed up this, even 2 seconds of loading would be much better.

Screenshots Here is the screenshot of Network tab and Payload, Preview, Timing tabs of one of the requests. image image image image

Desktop (please complete the following information):

Plugin Versions

Additional context Wordpress is hosted on the DigitalOcean server with 2v regular cpus and 4gb RAM. It is deployed and running as a docker container.

YishaqG commented 8 months ago

Hi @sheinid, I don't think this issue is related to WooGraphQL. Your performance issues could come from too many plugins installed or by your disk speed. If you're using a NetworkFileSystem, throughput is another metric to look at.

kidunot89 commented 7 months ago

@sheinid Can you share any information on how your caching your WordPress installation. Also have you confirmed that your installation isn't being bogged down by any other WordPress plugins using something like WP Query?