Answers.Body: <p>So, in this case the performance issue was caused by the fact that I had my Craft installation inside the Windows filesystem, while running Nitro in the WLS filesystem.</p>
  <p>The communication between Windows and WSL is not optimal, so it gets solved by moving your Craft installation into the WSL filesystem.</p>
  <p><a href="https://i.sstatic.net/gJFNT.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/gJFNT.png" alt="enter image description here" /></a></p>
  <p>You can access your WSL with <code>\\wsl$</code> in the address bar in the Windows filebrowser.</p>
  <p>With that change my page load went from 15s+ to 600ms.</p>
  <p><strong>More information</strong>: <a href="https://craftcms.com/docs/nitro/2.x/windows.html" rel="nofollow noreferrer">https://craftcms.com/docs/nitro/2.x/windows.html</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-02-17T08:48:41.607Z
Answers.LastActivityDate: 2022-02-17T08:48:41.607Z
Answers.UserDisplayName: Álvaro Franz
Body: <p>I am running CraftCMS locally but it's extremely slow.</p>
  <p><strong>What does extremely slow mean</strong>:</p>
  <ul>
  <li>login takes 10-15 seconds</li>
  <li>clicking any admin screen takes 10-15 seconds</li>
  <li>viewing an entry takes 10-15 seconds ...</li>
  </ul>
  <p><strong>Specifications</strong>:</p>
  <ul>
  <li>CPU: Intel Core i7 11th gen</li>
  <li>RAM: 12 GB</li>
  <li>OS: Windows 11 with WSL2</li>
  <li>Using nitro</li>
  <li>Using docker</li>
  </ul>
  <p><strong>Debug Bar screenshot</strong>:</p>
  <p><a href="https://i.sstatic.net/Dq2xt.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Dq2xt.png" alt="enter image description here" /></a></p>
  <p>Note that everything else runs just perfect. So it's not a hardware issue.</p>
  <p>Also, this is a screenshot of the Task manager while a page is being loaded:</p>
  <p><a href="https://i.sstatic.net/QSmFI.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/QSmFI.png" alt="enter image description here" /></a></p>
  <p>CPU and RAM are okay.</p>
  <p><strong>I created a .wslconfig file with</strong>:</p>
  <pre><code>[wsl2]
  memory=10GB
  processors=4
  </code></pre>
  <p>So that Docker has enough power.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-15T11:48:05.113Z
Comments.Text: Could you share some more information about your development environment? What OS are you using? Do you use MAMP? Docker? Nitro? etc..
Comments.UserDisplayName: mike
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-15T11:48:18.113Z
Comments.Text: Go to your user account preferences and tick the box to show the debug toolbar in the control panel. Then you can drill down the response timeline to find the bottleneck. Do you have any plugins installed?
Comments.UserDisplayName: James Smith
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-15T11:56:22.590Z
Comments.Text: @mike - Thanks, just updated the question
Comments.UserDisplayName: Álvaro Franz
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-15T12:00:21.933Z
Comments.Text: @JamesSmith - Thanks, just updated with a screenshot. No plugin installed.
Comments.UserDisplayName: Álvaro Franz
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-15T13:57:50.727Z
Comments.Text: I have always found Nitro too slow, so I switched to Lando which is fairly straight forward, easy to setup and a lot quicker then Nitro is. Now, 10-15 seconds per pageload is slow: even for Nitro. So I suspect it is something with Docker. Can you confirm this by running any other docker application? Have you given Dockere enough resources? Is WSL2 installed correctly? Something else I noticed with WSL2 when I still used to develop on Windows was that it gets slowed down A LOT by all virus scanners (also windows defender) Maybe try playing with that?
Comments.UserDisplayName: mike
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-15T17:33:58.977Z
Comments.Text: You may also need to do some [Docker tuning](https://craftcms.com/docs/nitro/2.x/#recommended-docker-resources) if you haven’t already.
Comments.UserDisplayName: Matt Stein
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-16T13:08:03.393Z
Comments.Text: @MattStein - Thanks, my Docker setup has 10GB RAM and 4 CPUs, is there anything else I may have to add?
Comments.UserDisplayName: Álvaro Franz
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-16T17:42:50.927Z
Comments.Text: Probably not @ÁlvaroFranz, assuming those values are proportional to your system. (More isn’t always better.) Not sure if you saw Nitro’s [Windows notes](https://craftcms.com/docs/nitro/2.x/windows.html) but there’s some performance stuff in there as well.
Comments.UserDisplayName: Matt Stein
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-16T19:25:27.783Z
Comments.Text: @MattStein You sir are a genius. Thanks so much! That information has saved me. I will add an answer to this for others having the same issue in the future. Time is now less than 600ms, much better!
Comments.UserDisplayName: Álvaro Franz
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-16T22:42:37.837Z
Comments.Text: Nobody has ever accused me of that @ÁlvaroFranz, but thank you and I’m glad that solved it for you!
Comments.UserDisplayName: Matt Stein
Tags: <performance><nitro>
Title: Local craftCMS is running extremely slow on Windows with WSL2
ThreadText: # Local craftCMS is running extremely slow on Windows with WSL2
  
  (Asked by: username_0 on 2022-02-15)
  
  I am running CraftCMS locally but it's extremely slow.
  
  **What does extremely slow mean**:
  
  * login takes 10-15 seconds
  * clicking any admin screen takes 10-15 seconds
  * viewing an entry takes 10-15 seconds ...
  
  **Specifications**:
  
  * CPU: Intel Core i7 11th gen
  * RAM: 12 GB
  * OS: Windows 11 with WSL2
  * Using nitro
  * Using docker
  
  **Debug Bar screenshot**:
  
  [![enter image description here](https://i.sstatic.net/Dq2xt.png)](https://i.sstatic.net/Dq2xt.png)
  
  Note that everything else runs just perfect. So it's not a hardware issue.
  
  Also, this is a screenshot of the Task manager while a page is being loaded:
  
  [![enter image description here](https://i.sstatic.net/QSmFI.png)](https://i.sstatic.net/QSmFI.png)
  
  CPU and RAM are okay.
  
  **I created a .wslconfig file with**:
  
  ```
  [wsl2]
  memory=10GB
  processors=4
  
  ```
  
  So that Docker has enough power.
  
  **Tags:** performance, nitro
  
  > **Comments:**
  > **username_1**: Could you share some more information about your development environment? What OS are you using? Do you use MAMP? Docker? Nitro? etc..  
  > **username_2**: Go to your user account preferences and tick the box to show the debug toolbar in the control panel. Then you can drill down the response timeline to find the bottleneck. Do you have any plugins installed?  
  > **username_0**: @username_1 - Thanks, just updated the question  
  > **username_0**: @username_2 - Thanks, just updated with a screenshot. No plugin installed.  
  > **username_1**: I have always found Nitro too slow, so I switched to Lando which is fairly straight forward, easy to setup and a lot quicker then Nitro is. Now, 10-15 seconds per pageload is slow: even for Nitro. So I suspect it is something with Docker. Can you confirm this by running any other docker application? Have you given Dockere enough resources? Is WSL2 installed correctly? Something else I noticed with WSL2 when I still used to develop on Windows was that it gets slowed down A LOT by all virus scanners (also windows defender) Maybe try playing with that?  
  > **username_3**: You may also need to do some [Docker tuning](https://craftcms.com/docs/nitro/2.x/#recommended-docker-resources) if you haven’t already.  
  > **username_0**: @username_3 - Thanks, my Docker setup has 10GB RAM and 4 CPUs, is there anything else I may have to add?  
  > **username_3**: Probably not @username_0, assuming those values are proportional to your system. (More isn’t always better.) Not sure if you saw Nitro’s [Windows notes](https://craftcms.com/docs/nitro/2.x/windows.html) but there’s some performance stuff in there as well.  
  > **username_0**: @username_3 You sir are a genius. Thanks so much! That information has saved me. I will add an answer to this for others having the same issue in the future. Time is now less than 600ms, much better!  
  > **username_3**: Nobody has ever accused me of that @username_0, but thank you and I’m glad that solved it for you!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-02-17. Score: 2 | Accepted answer
  
  So, in this case the performance issue was caused by the fact that I had my Craft installation inside the Windows filesystem, while running Nitro in the WLS filesystem.
  
  The communication between Windows and WSL is not optimal, so it gets solved by moving your Craft installation into the WSL filesystem.
  
  [![enter image description here](https://i.sstatic.net/gJFNT.png)](https://i.sstatic.net/gJFNT.png)
  
  You can access your WSL with `\\wsl$` in the address bar in the Windows filebrowser.
  
  With that change my page load went from 15s+ to 600ms.
  
  **More information**: <https://craftcms.com/docs/nitro/2.x/windows.html>
  
  
  ---
  
  