RFC: Performance and Logging in Headless WordPress Applications #152
colinmurphy
started this conversation in
RFC
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Title: Performance and Logging in Headless WordPress Applications
Author: Colin Murphy
Status: Draft
Created: May 2nd, 2025
Last Updated: May 6th, 2025
Abstract
In the context of headless WordPress (HWP) development, performance can be one of the key factors for using headless but it can also be of the most difficult parts of headless applications when you have performance issues and bottlenecks.
The difficulty of debugging performance can be due to a variety of factors such as knowing what the next steps are, where to debug and how to identify the performance bottlenecks (e.g. inefficient GraphQL queries, not using paginated queries etc).
Additionally sometimes these issues only replicable on a initial uncached request or a preview request and there can be difficulty tracing these requests and correlating your frontend and backend requests to help identify performance issues of your HWP application.
Motivation
Our motivation is to help HWP developers identify key performance issues at the earliest stage possible and also give them the resources and tools to resolve these issues in a timely fashion as possible when they do run into performance issues. We also want to give developers knowledge on key concepts around performance for HWP applications so they can learn best practices and avoid these pitfalls when building or maintaining a HWP application.
HWP applications are all unique and additionally can be complex in terms of setup so therefore when there are performance issues it can be hard to determine the root cause of issue, additionally there can be be multiple issues which can make it hard to debug and resolve. This can lead to frustration for a developer and also have a negative UI/UX experience for the user on the frontend of the application.
Our aim is to help alleviate these pain points by supplying relevant documentation around performance (such as best practices, debug help guides) and tools to analyze the performance of your headless application as the first steps.
Research
The RFC title is "Performance and Logging in Headless WordPress Applications" but seen realized from our research that this RFC would not be a finished piece but rather a long term incremental approach to helping developers with performance and logging in a HWP application.
The reason why is after reviewing Faust.js which we maintain and the HWP ecosystem along with having conversations with our community, we realized there was a clear initial list of first steps and "Logging" would need to be another step in our journey for this RFC.
Our first steps are based around "How does a HWP developer know how to debug their HWP application or how do they know what are the best practices when building their HWP application?" which is around the theme of "observability" and documentation.
Proposal
So the first initial phase of work we aim to cover three key areas:
These three areas centre around the idea of "observability". If a HWP developer can observe and know how to debug their application, then they are able to make informed decisions on the next steps. We can build on this in later steps with tools/plugins to give more detailed analysis and recommendations for performance and logging.
Note
We also want to continue to contribute to WPGraphQL and other HWP plugins to help improve performance and promote the Headless WordPress ecosystem.
Future Considerations
As part of the research we also did review Jason Bahl's RFC wp-graphql/wp-graphql#3292 and we will collaborate with Jason on helping building a logging plugin for WPGraphQL. However we felt at this time that we wanted to focus in on helping HWP developers with better documentation and tools for observability as the first step with logging being the next step to follow straight after.
Other considerations after this point would be further enhancing the profiling tool with being able to sync backend requests to the tool and more detailed analysis. We also considering WP plugins which might be an AI tool to help developers with analyze and recommendations on how to fix performance issues.
Note
We also will be making documentation and continuous updates of documentation a key part of our long term goal to help HWP developers with performance of their HWP applications.
Adoption Strategy
We aim to create the best documentation for the WordPress Headless Community and give relevant documentation and help guides to cover some of the difficult parts around performance of HWP applications.
We also aim to release a an initial POC profiling tool with basic capabilities around requests and caching. We also aim ot release a POC package for correlating frontend and backend requests for your Next.js application with a longer term view of this being framework agnostic. We also aim to update this RFC with next steps for "Logging" once we complete the initial phase of work.
We will promote and encourage community contributions and reviews to foster a collaborative learning environment.
How Do We Teach This?
We will ensure that our documentation and tools are easy to follow and use with good documentation. We will also provide strong community support and listen to feedback from our community it trying to help deliver a better experience for a HWP developer for dealing with performance.
How Can You Help?
We are excited about this new toolkit and the opportunities it presents for the WordPress headless community.
We’d love your feedback on the following:
RFC Changelog
Beta Was this translation helpful? Give feedback.
All reactions