Performance issues with Local on Windows 10

I’ve recently started testing flywheel, a couple of weeks ago the speed was unbearable however someone kindly pointed me towards Avast anti virus being the issue which reduced the majority of the loading times.

Since this I have been trying to find a way to speed loading up further as it still takes a good 10 seconds typically to load a page.

I have faster docker volumes enabled and IPv6 loopback on.

Is there a way I can send a log file perhaps so someone can point out why the speeds are so poor?
My setup isn’t exactly low spec.

Thank you

Mike

I am also experiencing this! If you do a fresh site fast and then if you import a site from live to local it’s so slow you can’t actually do any work! It can take upto 5-10 minutes for a site to load on mine :frowning:

Also here in windows 10

Hi all,

@hpsc created a great post that may help some of you who are running into performance issues with Local Lightning on Windows 10.

See below:

Still experiencing slow loading time for Local Sites on Windows 10. It takes around 5 seconds to login into WP Admin on a newly created site with no extra changes.

Using Local v5.6.6 and added the recommended php conf edits and Windows Defender exclusions.

I’d consider upgrading to Local Pro for the awesome Live Links upgrade but the slowness of loading any page makes it far preferable to spin up a password-protected site on a hosted server.

Hi Clay, the post Optimizing Local “Lightning” performance on Windows 10 has worked wonders on how responsive Local is on my old but well spec’d Windows 10 PC. It is simply a game changer. Would it be possible to update the info in the post to reflect the more recent file paths for v5? Also the changes to the config file php.ini.hbs, can these be made in a template file so they are added to each new site create in Local rather than editing each new site instance? Thanks, I am really going to enjoy using Local now it is so snappy!!

1 Like

Same here. Using 5.6.10+4674. No matter what I try, it takes about 15 second to render a page. With WAMP and XAMP I can get it spun up in a second. I found myself cursing under my breath A LOT last night. :face_with_hand_over_mouth:

I wonder why it’s so slow. :thinking:

1 Like

:smiley: I did it! I was able to get my pages to render in 2-3 seconds, and not 15.

Winning, and winning, and winning!

I used a combination of this:

Plus making sure to enable “Trust” in the SSL section.

Also running into performance issues on Windows 10 (2004 update), though not as severe as others here have. Recently got Lightning up and running (woo!), but comparing TTFB from the previous major version of Local (3.3.0) to Lightning (5.7.2+4801) there’s a pretty big ratio difference.

Using the default WP installation (5.5, twentytwenty theme) to test between the two:

  • 3.3.0 on PHP 7.3.2, Apache and MySQL 5.6, TTFB: 280 to 400ms.
  • 5.7.2+4801 on PHP 7.4.1, Apache and MySQL 5.7.28, TTFB: 2200 to 4200ms

Time spend on TTFB is mostly waiting, no DNS, TLS or other related waits.

Tried the various recommendations (trusted certificate, add folders to be exempted from Windows Defender scans, turned off xdebug and extra opcache settings) all of which have seem to have little impact. I’m impressed by Lightning’s start up speed and general responsiveness, but I’m concerned popping one of my regular custom builds (TTFB ~750ms) or something with WooCommerce on it (TTFB anywhere from 4000ms to 11000ms) will destroy any benefits it’ll have.

PC is Windows 10 (V2004, 19041.450), running an i7-4790k (defaultish clock speeds) on 16GB DDR3-1866, on the older side but what I thought would still be fine to run. Haven’t noticed high task CPU usage when loading site like I did on 3.3 (15% to 20% from VirtualBox).

I’ll try and load one of my existing local sites on Lightning to see if the TTFB scales or there’s some sort of flat cost to it, as well as a WooCommerce install.

I followed the advice in the Optimizing Local on WIndows thread, and in this one too, and can load pages in ~5-10secs or so.

But they don’t cache. Even using the back button, or revisiting a page just visited, is agonizingly slow. The whole system is just too slow to use.

So my newbie question is: what’s the point? Why not just work from a server? It would be so much faster! I thought local serving was going to let me have the lightning page loads I see in developer videos on youtube.

Just getting started, so maybe there are other important value props I’m missing?

1 Like

Same thing here, fresh install on fresh Windows 10 and everything is very very slow. I don’t always remember Local being like this. Must have something to do with sloppy Windows 10 code.

:smirk:

It looks like Laragon, DesktopServer OR instantwp might be the best route, or something like qsandbox.com – maybe i’ll just dig around and find something else on DDG

1 Like

Switching from MariaDB to MySQL 8 drastically improved loading times for me, they’re now down to 450ms, as described in my comment here: Update on performance on Windows 10?

Not sure if MySQL 5.7 → MySQL 8 sees a similar speed improvement, but definitely a hot tip if you’re currently using MariaDB in development! :slight_smile:

Tried to fully reinstall Local and delete my sites to check why my previous TTFB in Windows was around 3-4s even for a new barebones default site. Turns out even reinstalling wasn’t helping as it is somehow tied to the default php.ini file config issue as stated by @hpsc.

Setup:

OS: Windows 10 Pro build 19042.746
PHP: 8.0.0
MySQL: 8.0.16
Apache: 2.4.43

In my end, I was able to reduce TTFB to 40-50ms just by commenting out the zend_extension = php_xdebug.dll part of the config file php.ini. I didn’t have to add the additional opcache options or add the folders to windows defender like what is said in @hpsc’s fix.

Sorry, but would anyone know why we need to comment php_xdebug to reduce the TTFB?

@codeNagi People here are largely noticing that disabling xdebug is helping because v2 is generally quite slow due to its large footprint compared to the newer v3 (see this performance analysis). I have proposed that Local upgrades the v2 to v3 (both here and here) but it appears that it is only in place right now for the PHP 8 version; I haven’t read anything about it being backported to the older PHP versions.

2 Likes

Unfortunately for me, none of the solutions have worked including commenting out zend_extension = php_xdebug.dll, adding cache changes and upgrading to PHP 8.

Oddly, this slowness is only happening on a single site, whereas others are perfectly fine. It is only a small site so I am sure that isn’t the issue. It takes around 15s to load a page, whereas it is instantaneous on a live server.

Would really love some help on this.

Best,

For anyone who has not experienced an improvement from any of the above steps, and continues to experience slow loading times in Windows with anything but the default config of PHP 7.3.5. and mySQL 8.0.16:

try to modify your wp-config file to use 127.0.0.1 instead of localhost, like so.

No idea why this works, but it does for me at least. My PHP 8.0.0, MariaDB 10.4.10 site now works lighting fast locally.

4 Likes

Thank you - all other solutions (opache, xdebug, firewall, etc) had no effect on page load time - this fixed it and site now loads (almost) instantly.

1 Like

None of these worked for me… brand new laptop with AMD Ryzen 74800. (bitdefender exclusions, xdebug turned off, opache settings added…)

I tried everything

  • modify the php
  • modify the wp-config localhost
  • exclude all the folders from avast …

But still, it took me 15mn (15mn !!!) to just deactivate the extension akismet !!!

Any other tips ? Thanks

Well… I thought I was alone in this but thankfully I am not. Yeah, Local has become alarmingly slow and updates for themes or plugins not working at all.