Skip to content

Feature Request: re-enable php opcache for dev-environments? #1442

@schuhwerk

Description

@schuhwerk

Terms

Summary

Re-enabling opcache for dev decreases load time (in my case) by ~30%.

Motivation

I'm developing on Windows and my VM is slow (0.3s on production vs. 2.5s on dev for the same page).
I tried re-enabling opcache and obviously ran into the problem discussed here.

So I added/changed the following settings (group_vars/development/php.yml):

php_opcache_enable: 1
php_opcache_validate_timestamps: 1
php_opcache_revalidate_freq: 1

This brings down loading times for the same page (mentioned above) to 1.7s.

I don't have any problems with file-changes. In my case php_opcache_revalidate_freq can even stay at 60. This would even bring the dev-configuration closer to the one on the production environment.

I'm not sure, how it is for other environments, so we might be able to collect different experiences for other OSes/Configurations here.

Additional Context

I used several runs of Performance Insights (within Chrome's dev-tools) for the benchmarks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions