3

I rarely post on SO, but this time, I'm going really desesperate.

The Symfony 3.4 project I work on in my company run under Docker installed on a WSL2 machine. Previous developpers choose this way to develop on multiple projects. It work fine on their machine, but on my machine, it probably has the slowest execution time I ever seen on a PHP project.

Here are some screenshots of the performance (even the profiler screen took minutes to display) :

enter image description here

enter image description here

enter image description here

enter image description here

I precise that LocaleListener has very very few code, nothing that should take minutes to execute.

And it does this for every request, or AJAX request, on every page of the website. It is a nightmare to work on, and nobody in the team know why. We all use the same docker-compose file.

Any help would be appreciated.

  • Maybe these posts can help you https://stackoverflow.com/questions/40650015/problems-with-symfony-performance/40666058 https://stackoverflow.com/questions/48346427/symfony-4-extremely-slow-on-windows – glinda93 Nov 17 '20 at 11:30
  • 4
    Bind mounts on the windows machine with applications running in wsl tend to have a big impact on performance. I had this issue before and resolved it by running everything in wsl. So my bind mounts are mapped to my wsl drive, not my Windows drive. – Julien B. Nov 17 '20 at 12:48
  • @JulienB. Hi! Thanks for your advice. Could you please give a bit more info how to map volumes to wsl not windows? – Alexander Oct 25 '21 at 12:31
  • Well, what I do is I clone the repo in wsl directly. In /home/my-username/dev/my-project. This way everything stays in Linux. – Julien B. Oct 25 '21 at 12:59
  • Yeah, definitely a mount issue for me. I was using the Symfony code from a mount. Then I moved everything inside the image (I can still access it from outside with \\wsl path) and it's suddenly very efficient. – miqwit Feb 02 '22 at 09:07

0 Answers0