EricH

EricH

Planned

In addition to OPCache PHP has also the following options in php.ini:

; Determines the size of the realpath cache to be used by PHP. This value should
; be increased on systems where PHP opens many files to reflect the quantity of
; the file operations performed.
; Note: if open_basedir is set, the cache is disabled
; https://php.net/realpath-cache-size
realpath_cache_size = 4096k

; Duration of time, in seconds for which to cache realpath information for a given
; file or directory. For systems with rarely changing files, consider increasing this
; value.
; https://php.net/realpath-cache-ttl
realpath_cache_ttl = 120

This is disabled by default, just like OPCache, but greatly improves page loading times with scripts with a lot of includes, like Laravel / Composer autoloading.

See for example this Performance Checklist by Symfony: https://symfony.com/doc/current/performance.html#configure-the-php-realpath-cache

Something to enable by default for new configurations? Or a nice setting modal just like now for OPCache?

Thanks!

php.ini - realpath cache

1 total vote
EricH
  • Dennis moved item to board Planned

    3 days ago
  • EricH moved item to project Server Level Requests

    1 week ago
  • EricH created the item

    1 week ago