Optimizing Local "Lightning" performance on Windows 10

Hi there,
while setting up Local “Lightning” on my Windows 10 machine I observed a very poor performance of local sites (TTFB around 30-50s). I have been using Local by Flywheel (3.3) on MacOS Catalina before - no issues there.

Now I would like to share my insights with the community to (maybe) help others with this performance issue.

PHP Config for custom environment (edited /conf/php/php.ini.hbs):
added:

[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=64
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.revalidate_freq=5
opcache.enable_file_override=0
opcache.dups_fix=1

disabled:

[xdebug]
; zend_extension = php_xdebug.dll

Windows Defender:
I added exclusions for the following folders (Local’s PHP, nginx and MySQL executables):

\AppData\Local\Programs\Local\resources

\AppData\Roaming\Local\lighning-services

as well as the folder of my local sites:

\Local Sites

With these settings, my TTFB is down to 3-4s. Hope this helps!

12 Likes

Thanks so much! I’ve just started having this problem when I migrated to another one of my machines and it was driving me crazy! Just to clarify though, there was one individual recommendation above that had a huge impact (took my TTFB down from ~30-60 seconds to almost instant ~1 second). That was to add the “Local Sites” folder to my Windows Defender exclusions. It would be good if the team could add this to some sort of FAQ for common Windows’ issues.

4 Likes

Hi @hpsc,

Thanks so much for this post! I’ve moved it to the #workflow category and pinned it globally.

2 Likes

If anyone else continues to see performance issues with Local on Windows 10 after going through these steps, please create a post with any pertinent details in Performance issues with Local on Windows 10.