wp-graphql / wpgraphql-acf

Re-architecture of WPGraphQL for ACF
GNU General Public License v3.0
91 stars 12 forks source link

Slower than expected query timings #238

Open archoda opened 2 months ago

archoda commented 2 months ago

Description

Getting much slower than expected query timings.

Querying something simple like just '/graphql?query=generalSettings{{description}} runs avg. 700ms+. Page queries Like the one below ) w/ complex flexible layouts, nested groups are avg. 2.9s+ ( and longer ) on local and wpengine.

This issue seems similar, but not exact to this performance issue

Secondarily, I have WPGraphQL SmartCache setup too. Max-age is set for a long time, but, also only seems to stay in the network cache for a very short time which makes relying on cache more challenging.

Steps to reproduce

  1. Import field groups: acf-export-2024-09-13-slow-queries.json
  2. Ensure the 'acf-local' load and save as prescribed by ACF docs are setup for more efficiencies
  3. Create a simple test page with a header and a few section options
  4. Create a graphql document name 'queryPageUri' of this query acf-export-2024-09-13-slow-queries.txt
  5. Query the document using the /graphql?queryId=queryPageUri&variables={"slug":"/"}

PHP or JSON export of the ACF Field Group(s)

No response

Additional context

Screenshot 2024-09-13 at 4 13 09 AM

Screenshot 2024-09-13 at 4 35 53 AM

Screenshot 2024-09-13 at 4 37 04 AM

WPGraphQL Version

1.28.1

WPGraphQL For ACF Version

2.4.1

ACF (Advanced Custom Fields) Version. Free or Pro?

PRO

WordPress Version

6.6.2

PHP Version

8.3.8

Additional enviornment details

Pretty simple set-up.

Please confirm that you have searched existing issues in the repo.

Please confirm that you have disabled ALL plugins except for WPGraphQL, WPGraphQL For ACF, ACF, etc.