You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a schema has multiple sections and entry types, every query seems to be a lot slower. For example
{
ping
}
On an empty public schema takes 48ms. Once that schema has access to sections and entry-types, the exact same query shoots up to 203ms. Even when GraphQL caching is enabled, the difference persists. Fewer sections = faster queries, even if those sections have nothing to do with the query at hand.
It feels like something to do with parsing or generating the schema is happening on the fly in each query. I might be mistaken. We see the increase in execution time creep up with each new section added.
Steps to reproduce
Run a ping test on an empty schema
Run a ping test on a schema attached to a bunch of sections
Additional info
Craft version: Craft CMS 3.6.16
PHP version: 8.07
Database driver & version: MySQL 5.7.0
Plugins & versions: I've disabled all plugins for the purpose of this experiment
The text was updated successfully, but these errors were encountered:
The GraphQL schema needs to be generated for every query (no matter how simple) so that the query can be validated, which incurs overhead, that increases as the site's complexity increases.
There's a whole discussion about this over at #7222, so I'm closing this as a duplicate.
Description
When a schema has multiple sections and entry types, every query seems to be a lot slower. For example
{ ping }
On an empty public schema takes
48ms
. Once that schema has access to sections and entry-types, the exact same query shoots up to203ms
. Even when GraphQL caching is enabled, the difference persists. Fewer sections = faster queries, even if those sections have nothing to do with the query at hand.It feels like something to do with parsing or generating the schema is happening on the fly in each query. I might be mistaken. We see the increase in execution time creep up with each new section added.
Steps to reproduce
Additional info
The text was updated successfully, but these errors were encountered: