PHP 8.0.0+3 still slow on Windows10

CC:@ben.turner,@afragen,@elliottmangham,@amjadali,@dvallieres,@TonyGman,@dewitteprins,@davidfw

Quick update on my situation. I found several relevant other posts on this forum which I mention below because they are relevant for how I was able to solve the speed issues =>

The gist of it is; XDEBUG3 is now used for PHP8 but the php.ini from LocalWP is not correct and should be changed (thanks @afragen).
To change the php.ini I had to change it in 2 locations =>

  1. the php.ini file in the project itself => /conf/php-8.0.0./php.ini.hbs
  2. the php.ini in the lightning-services folder => /Users/{username}/Appdata/Roaming/Local/Lightning-services/php-8.0.0+3/conf/php.ini.hbs

My adjustments were as followed =>

xdebug.mode=develop
xdebug.client_port=9003
xdebug.start_with_request=trigger
xdebug.discover_client_host=yes

XDEBUG.MODE=DEVELOP

To get the same xdebug output as I was used to on version 2.9, instead of using xdebug.mode=debug it required xdebug.mode=develop to also get the var_dump overloaded functionality.

This however in turn caused issues with the site shell. Basically the site shell did not work at all.
I found a way to get this fixed by modifying the 2 batch files which are called when opening the site shell.

The locations for these 2 batch files are:

  1. /Users/{username}/Appdata/Local/Programs/resources/extraResources/bin/wp-cli/win32/wp.bat
  2. /Users/{username}/Appdata/Local/Programs/resources/extraResources/bin/composer/win32/composer.bat

The changes are to add -dxdebug.mode=debug like in this example:

The one remaining issue is that the LocalWP app itself is no longer able to retrieve the WP version from the site.

@ECHO OFF
php -dxdebug.mode=debug “%~dp0..\wp-cli.phar” %*

JIT

I also tried to enable JIT, but was not able to. As soon as you add the

opcache.jit_buffer_size=256M

Or any other size it no longer works.

If someone finds out why and it able to get it working, let us know, love to test the speed with this additional optimization.

Thanks!
Ruud