Open DylanBracke opened 1 year ago
Agreed this is extremely slow in comparison to my old environment using PHP 7.3
(which was already slow due to Docker + Windows bind mounts).
I'm not seeing load times in minutes though. On my SSD + high power dev laptop, I'm seeing ~10 seconds for initial load and about ~4s navigating WP-Admin. This compares to about ~5 seconds initial load and ~2s navigation in my old environment. It's still not a workable dev experience.
For reference, I'm migrating from my nimble
dev environment which used Docker Compose v1.
https://github.com/johnrom/nimble https://github.com/johnrom/nimble-wp-template https://github.com/johnrom/docker-wordpress-wp-cli-xdebug
I believe filesystem is the limiting factor here, but I'm going to look into it a bit and see if I can mitigate it with caching.
Edit: It seems like the use of spl_autoload_call
is a major factor which stands out after looking at the cachegrind files, so I'm thinking it's filesystem related. Hoping to dig deeper by next week. I'm hoping proper configuration of opcache / apcu can help here.
I am also experiencing extremely slow performance; WP-Admin takes about 45 seconds to load and the site times out most of the time. I have followed the most up-to-date install instructions on the https://docs.lando.dev/wordpress/getting-started.html page. I am running Windows 11 with Lando and all relevant files are stored on an NVME SSD.
cat .lando.yml:
name: redacted
recipe: wordpress
config:
webroot: wordpress
The best way to improve performance is to exclude WP directories from bind mounting. This means that you will NOT be able to make changes to these files at runtime, they will be copied to the internal docker instance on startup and not synced. You'll have to restart lando in order to copy changes. Remember to rebuild after making changes to the lando.yml
.
Additionally, if you are using composer, you'll want to add the vendor/
directory -- or node_modules
for node.
recipe: wordpress
# docs: https://docs.lando.dev/core/v3/performance.html
excludes:
- web/wp
- web/app/mu-plugins
- web/app/plugins
- '!web/app/plugins/your-plugin'
- web/app/themes
- '!web/app/themes/your-theme'
Edit: You probably don't have to ignore the plugins directory, but for plugins with tons of files like WooCommerce it will improve performance.
What is your lando version and operating system? (note that the older your version the less likely we are to reply)
Tell us about your .lando.yml
Commands:
Tell us about the error you got
Tell us more