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!