As the release of WordPress 5.0 comes closer, I was curious about performance of sites running Gutenberg (the proposed replacement for the WordPress post editor). To answer the question, I wrote a lightweight benchmarking mu-plugin, that I’ll write more about in a future post, once I’ve given it a little more polish.
As a test, I generated two identical pages, one with the Gutenberg editor, and the other with the Gutenberg plugin disabled, and ran my benchmarking script on each.
The results were a huge surprise to me. I had expected that the `the_content` filter (the number that isn’t highlighted in the above screenshot) would take significantly longer to run with Gutenberg, due to all the processing done on the post. In fact, it seems to take significantly less time than the original editor does, over an average of 20 page loads. This may be because Gutenberg doesn’t run wpautop on the_content.
However, the overall rendering time for a simple text-only post increased by almost 500%, when Gutenberg was enabled. There is certainly some level of optimization that will occur when Gutenberg is merged to the WordPress core, but in general, it seems like WordPress’s baseline speed may suffer significantly.
For a last, interesting test, I installed and enabled the “classic editor” plugin, and used it to completely remove the Gutenberg editor, in the manner recommended by the Core team for those who do not want the new Gutenberg Editor experience. Then I ran a few benchmarks:
Even after disabling Gutenberg with the Classic Editor plugin, overall rendering time is still 300% slower than the existing editor.
I sure hope someone is working on this.