I’m working on a project that has grown quite complex and apparently slow.
Local env: Lando (with xdebug) + Bedrock + Sage 10 (Acorn v3)
Prod env: AWS EC2 (t3.medium) + Trellis (Ubuntu 20.04 deploy)
As for the theme, I’ve been trying to keep the usage of unnecessary plugins to bare minimum, currently: ACF Pro, Gravity Forms, WooCommerce, WooCommerce Subscriptions, WP Rocket, WPML, Yoast SEO and a few other smaller ones that I don’t consider worth mentioning.
Chrome Developer tools tell that “Waiting for server response” varies between 2- 6.5 sec. However I’ve already refactored the code thoroughly (easily 40+ hours into it), optimized queries and made sure everything is as DRY as possible (to my knowledge of 7+ years with WP and PHP in general).
For those views that are the slowest I’ve tried troubleshooting with the following tools:
Xdebug - very useful and highly recommended tool for developing overall.
Xdebug profiler - seems very promising but haven’t had any luck getting it to work with Lando, although the setup configuration is pretty straight forward. I might look into it once more.
Debug Bar - looked into it, but seems quite similar to Query Monitor and I feel Query Monitor is giving more useful information.
Query Monitor - that shows the “Page Generation Time” varies 2.5-4 sec but “Database Queries” is ~0.1 sec (~230 SELECTS) and “Peak Memory Usage” ~55 MB at most parts.
There is a quite in depth article on using Query Monitor. The “Plugin profiling with Queries by Component” seems like another interesting aspect to look into.
Also, Profiling and Logging in Query Monitor is something that might help diagnose further but it is a very manual implementation and usefulness heavily relies on the developer.
Overall, “profiling” seems to stand out as an important keyword here.
Are there any other “must have” tools to use for diagnosing what’s going on server-side (profiling and timings)? Any other ideas?