Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lando taking +5 min te load WordPress site and navigate in WordPress on Windows 11 #31

Open
DylanBracke opened this issue Feb 22, 2023 · 3 comments

Comments

@DylanBracke
Copy link

DylanBracke commented Feb 22, 2023

What is your lando version and operating system? (note that the older your version the less likely we are to reply)

v3.11.0

Tell us about your .lando.yml

name: (hidden)
recipe: wordpress
config:
  webroot: .
  php: 7.4
  database: mysql
services:
  phpmyadmin:
    type: phpmyadmin

Commands:

lando start

Tell us about the error you got

It takes a really long time to load +5min, and every navigation after also takes +2 min making it impossible te use.
I am using the Docker Desktop that came with the Windows Lanso intall and als files are located on my C drive.

Tell us more

Windows 11
cores : 6
ram : 8GB

@pirog pirog transferred this issue from lando/lando Feb 22, 2023
@DylanBracke DylanBracke changed the title Lando taking +5 min te load and navigate in WordPress on Windows 11 Lando taking +5 min te load WordPress site and navigate in WordPress on Windows 11 Feb 22, 2023
@johnrom
Copy link

johnrom commented May 4, 2023

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.

@zohfur
Copy link

zohfur commented Sep 1, 2023

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

@johnrom
Copy link

johnrom commented Sep 1, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants