-
Notifications
You must be signed in to change notification settings - Fork 877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REST API: yoast_head performance issues #15780
Comments
There is no such option available at the moment. I'll mark this as a feature request. |
Hello Yoast, |
Also having issues when listing posts, seems like yoast_head and yoast_head_json should be added for a post when requesting a single post by id or slug (as well as adding it to single author, etc) but seems like an overkill when listing posts by category for example, the response right now for a list of posts is massive. |
I am sure there is a cleaner solution but this is a quick patch I came up with to only add
You can also just hardcode the list of post types in $paths instead of going through that loop.
If you do so then just replace the regex where |
Hi,
We use the REST API to get a list of all our posts.
Without the “REST API: Head endpoint” feature enabled it takes us around 400ms - 600ms to get 500 posts via the API. Unfortunately when we enable the “REST API: Head endpoint” this jumps up to around 14 seconds which is quite an increase.
I understand that this time increase might be unavoidable and our use case is probably very rare however it would be good to have a way to disable the ‘yoast_head’ field without having to disable the entire Yoast REST API. An option may already exist but I could not find it.
Thanks,
Stephen
The text was updated successfully, but these errors were encountered: