<p>My CP pages are taking ~15 sec to load. It seems the bottleneck is in rendering the Twig templates. This slowness also seems to have manifested quickly and it's affecting multiple separate Craft CMS apps running on the same server. Any idea what might be going on?</p>
<p>Also, new posts aren't appearing under its category.</p>
<p>PHP version:    7.4.33
OS version: Linux 5.4.0-1097-aws
Database driver &amp; version:  MySQL 5.7.38
Image driver &amp; version: Imagick 3.7.0 (ImageMagick 6.9.7-4)
Craft edition &amp; version:    Craft Pro 3.7.21</p>
<p>Things I've tried:</p>
<ul>
<li>scoured the debug toolbar data</li>
<li>disabled all the plugins</li>
<li>reverted databases</li>
<li>increased the compute</li>
<li>cleared caches</li>
<li>replaced the file share</li>
<li>the are no modules bootstrapped</li>
</ul>
<p>It's behind a load balancer, connecting to RDS, and using a mounted EFS for the Craft files.</p>
<p><a href="https://i.sstatic.net/IomyQ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IomyQ.png" alt="enter image description here" /></a></p>
<p><a href="https://i.sstatic.net/F3gGp.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/F3gGp.jpg" alt="enter image description here" /></a></p>
<p><a href="https://i.sstatic.net/wYrVn.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/wYrVn.jpg" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2023-03-22T00:07:38.033Z
There’s really nowhere near enough information to provide you with a useful answer, so I recommend you do some digging first and post your detailed findings in the question.
Ben Croker
CC BY-SA 4.0
2023-03-22T15:55:23.560Z
I added more info. Is there anything more you suggest?
Frankly, I'm stuck and this a a Hail Mary.
Steven Wenrich
CC BY-SA 4.0
2023-03-23T02:18:17.503Z
You mention AWS - can you describe how the infrastructure is setup? i.e. EC2 instances behind a load balancer connecting to RDS? Are you using EFS at all for anything?
Brad Bell
CC BY-SA 4.0
2023-03-23T19:10:50.133Z
@BradBell yes to all, it's behind a load balancer, connecting to RDS, and using a mounted EFS for the Craft files.
Steven Wenrich
CC BY-SA 4.0
2023-03-25T00:14:42.797Z
As in all of the Craft files in the installation are mounted in an EFS mount? That's almost certainly the issue. EFS throughput isn't that great in my experience.
Brad Bell
CC BY-SA 4.0
2023-03-27T14:04:40.213Z
@BradBell Yes, all of the Craft files. Any insight of why the latency is most pronounced in the control panel?
Steven Wenrich
CC BY-SA 4.0
2023-03-27T16:13:30.620Z
@StevenWenrich I'd guess it's because on average, control panel requests hit the filesystem more than front-end requests do.
Brad Bell
CC BY-SA 4.0
2023-06-02T20:53:19.470Z
I've got an almost identical situation where CP twig rendering adds up to ~15s load times. Oddly, I'm only getting this on local development (docker) but on production (AWS Elastic Beanstalk) it's super quick. @StevenWenrich did you ever figure anything out for this?
danbrellis
CC BY-SA 4.0
2023-06-07T15:36:51.187Z
BTW- for my situation it was that I was running Docker using WSL but not keeping the files in the linux filesystem, thus the slow render times for the twig files. This lines up with Brad's suggestion that it's a filesystem issue.
danbrellis
<templating><control-panel><performance>
CP templates are slow to render
# CP templates are slow to render

(Asked by: username_0 on 2023-03-21)

My CP pages are taking ~15 sec to load. It seems the bottleneck is in rendering the Twig templates. This slowness also seems to have manifested quickly and it's affecting multiple separate Craft CMS apps running on the same server. Any idea what might be going on?

Also, new posts aren't appearing under its category.

PHP version: 7.4.33
OS version: Linux 5.4.0-1097-aws
Database driver & version: MySQL 5.7.38
Image driver & version: Imagick 3.7.0 (ImageMagick 6.9.7-4)
Craft edition & version: Craft Pro 3.7.21

Things I've tried:

* scoured the debug toolbar data
* disabled all the plugins
* reverted databases
* increased the compute
* cleared caches
* replaced the file share
* the are no modules bootstrapped

It's behind a load balancer, connecting to RDS, and using a mounted EFS for the Craft files.

[![enter image description here](https://i.sstatic.net/IomyQ.png)](https://i.sstatic.net/IomyQ.png)

[![enter image description here](https://i.sstatic.net/F3gGp.jpg)](https://i.sstatic.net/F3gGp.jpg)

[![enter image description here](https://i.sstatic.net/wYrVn.jpg)](https://i.sstatic.net/wYrVn.jpg)

**Tags:** templating, control-panel, performance

> **Comments:**
> **username_1**: There’s really nowhere near enough information to provide you with a useful answer, so I recommend you do some digging first and post your detailed findings in the question.  
> **username_0**: I added more info. Is there anything more you suggest? Frankly, I'm stuck and this a a Hail Mary.  
> **username_2**: You mention AWS - can you describe how the infrastructure is setup? i.e. EC2 instances behind a load balancer connecting to RDS? Are you using EFS at all for anything?  
> **username_0**: @BradBell yes to all, it's behind a load balancer, connecting to RDS, and using a mounted EFS for the Craft files.  
> **username_2**: As in all of the Craft files in the installation are mounted in an EFS mount? That's almost certainly the issue. EFS throughput isn't that great in my experience.  
> **username_0**: @BradBell Yes, all of the Craft files. Any insight of why the latency is most pronounced in the control panel?  
> **username_2**: @StevenWenrich I'd guess it's because on average, control panel requests hit the filesystem more than front-end requests do.  
> **username_3**: I've got an almost identical situation where CP twig rendering adds up to ~15s load times. Oddly, I'm only getting this on local development (docker) but on production (AWS Elastic Beanstalk) it's super quick. @StevenWenrich did you ever figure anything out for this?  
> **username_3**: BTW- for my situation it was that I was running Docker using WSL but not keeping the files in the linux filesystem, thus the slow render times for the twig files. This lines up with Brad's suggestion that it's a filesystem issue.  

---

## 0 answers

