Open sobkulir opened 1 year ago
Not 100% sure, but this could be because PHP opcache is disabled for the dev environment.
We use the prod Docker image for development, and set this ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS=1;
. It still has opcache enabled, but it checks timestamps for changes in PHP files to clear te cache. Hope that also helps in your case.
I suspect @thijskaspers is right. It sounds like others have had luck with opcache
enabled in dev, with opcache.validate_timestamps=1
.
@thijskaspers any reservations about making this default for our dev image?
Thank you! Using prod image with ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS=1
in the Dockerfile seems to work great.
Description
I'm new to CraftCMS and inherited a website for maintanence. As the first step, I've tried to setup a dev and prod Docker environments. However, there seems to be a ~10x performance penalty when using
craftcms/nginx:7.4-dev
as base image compared tocraftcms/nginx:7.4
. I'm settingdevMode: false
.I can see two problems:
_layouts/components/alerts
seems to be the bottleneckUsing
craftcms/nginx:7.4
(loadingadmin/dashboard
takes under 500ms) Usingcraftcms/nginx:7.4-dev
(loadingadmin/dashboard
takes under 5000ms)Steps to reproduce
Additional info