Additionally, I've added exclusions to Windows Defender and tried switching off firewalls, no change.
Jul 28, 2022
2
Level 6
Issues with running PHP / laravel in WSL for Windows (load times)
The initial load times for my sites are really long (3 min +) if I run them on localhost.
I'm not sure why this issue is arising, and after reading up about it online there seem to be quite a few suggestions as to how to potentially resolve it, so here is what I have tried without success:
- I've run ```tracert localhost`` and found no additional hops back to localhost
- I've checked that there is no xdebug related stuff in my php.ini file
- My files are not in /mnt, but directly on my linux file system (I still think there is an issue, because PHPStorm takes forever to index and does so continuously)
- I'm not using docker
Does anyone know what this could be?
Level 6
For anyone else who really struggled with this, it turned out to be MySQL's performance on WSL2. By running the atop command, I could see that MySQL was using 100% - 150% of my CPU.
I managed to resolve this by installing Docker and running a docker instance of MySQL instead to which I connected my laravel application.
Please or to participate in this conversation.