WordPress did it: Performance improvements are picking up speed
The development of WordPress 6.2 led to improvements in the way the core development team works, resulting in a consistent focus on performance at every development step. These new processes catch problems at the point changes are introduced and prevent them from making it to the final version release.
The two improvements responsible for this change are:
- A new performance leads
- Automated benchmarking
These two improvements allowed the WordPress team to make performance a part of the development of each part of WordPress, essentially adding it to their development DNA.
Lessons learned from WordPress 6.1
The previous WordPress release, version 6.1, was characterized by a general drop in performance, which WordPress calls performance regression.
Performance regression occurs when an improvement leads to a decrease in performance.
What they discovered was that even though they had fixed the single largest cause of performance degradation and introduced several performance improvements, the site’s overall performance was still being impacted by changes that impacted performance.
WordPress explained the lesson they learned from version 6.1:
“Despite other performance improvements ending up in these versions, the regressions ultimately negated the improvements.”
…The more regressions there are, the less effective all other performance improvements are overall.”
Lead of WordPress Development
The WordPress 6.2 development process has concluded with the coordination of a new Performance Lead role.
The performance manager does not initiate the changes and improvements. That was the task of the development team.
The performance leads simply coordinated between the teams.
Each of the teams is responsible for the performance gains of their projects.
The power manager explained how this worked:
“This allowed me to work closely with and support the other contributors and align our approaches to performance measurement with them.
…the performance gains in this release are the result of the excellent work of multiple contributors in identifying underperformance.
Introducing the performance lead role… just brought a better representation of performance alongside the other members of the release team.”
Automated WordPress benchmarking
WordPress found that performance regressions went unnoticed because not every change could be manually checked for impact on the overall release.
To address the lack of being able to manually test every single change to the core, WordPress introduced automated performance benchmarking for all changes.
Automated performance benchmarking measures the impact of each change to uncover hidden performance bottlenecks before they make their way into final release versions.
WordPress describes this workflow change:
“Several contributors have collaborated to introduce an automated CI workflow for performance measurement into the WordPress core…
With this CI workflow, WordPress core performance metrics are now recorded for each individual commit and are available in this dashboard.
This allows us to easily spot potential regression where previously it would have gone unnoticed.”
The WordPress 6.1 update introduced performance regressions in Gutenberg, issues that would have been detected beforehand with automated tests.
Automated performance tests occur on every core commit in GitHub to measure how WordPress performs on block and classic themes.
The test also collects server timing metrics using the latest version of PHP.
More information on automated performance monitoring here: Automated Performance Monitoring in WordPress Core.
WordPress contributors collaborated
WordPress staff worked to identify areas that needed improvement, with a renewed focus on performance.
The server-side performance of the WordPress core was profiled using the open source tools Xdebug, XHProf and Blackfire (SaaS).
Benchmarking the WordPress core was less easy as the development groups used different tools.
Standardization of performance measurement tools is ongoing so that all teams measure the same thing with the same tools.
Fact: WordPress 6.2 performs better
The result of automated performance benchmarking and performance tuning between development teams is a significant improvement in performance metrics.
“Based on lab benchmarks, WordPress 6.2 loads 14-18% faster overall for block themes and 2-5% faster overall for classic themes (measured via Largest Contentful Paint / LCP).
Especially the server-side performance (measured via Time to First Byte / TTFB) sees a big boost of 17-23% for block themes and 3-5% for classic themes, which directly contributes to the overall load time.”
Performance testing doesn’t only take place in the core commit phase, benchmarking takes place for all WordPress release candidates.
WordPress describes this process:
“Especially at this point it is advisable to use the production ZIP version of the WordPress core (e.g. a specific beta or RC version) instead of measuring in the development environment of the WordPress core.
The benchmark-web-vitals command mentioned in the previous section is perfect for this use case as it provides high-level performance metrics that capture both server-side and client-side performance.
The resulting data can then be compared with the same metrics from e.g. B. the previous stable version to get an idea of how the performance of the WordPress core has changed (hopefully improved!) in the new version.”
WordPress has turned performance around a corner
WordPress has worked hard over the past few years to incorporate performance improvements into the development workflow.
But now the performance team integrates performance benchmarks directly into the development phase of each improved component at the GitHub commit level and leverages automated performance benchmarking to scale improvements.
In essence, WordPress has successfully incorporated performance into the DNA of its development process.
This is one of the most momentous changes in WordPress development and a sign that WordPress is on its way to catching up with other content management systems.
Finally, WordPress may be back in the performance game.
Read the full WordPress announcement, which includes details on their progress and links to the tools used to benchmark performance.
The benefits of prioritization and performance measurement in WordPress 6.2
Featured image from Shutterstock/Asier Romero