Acelere o Drupal com cache realpath

Quando sua instância do Drupal se torna lenta, há uma série de etapas recomendadas a serem executadas (verifique o cache da página, use APC / memcached / verniz).

Muitas vezes, o problema está no número de arquivos que o PHP precisa abrir durante o bootstrap do Drupal. Está diretamente relacionado ao número de módulos habilitados, que às vezes você simplesmente não pode reduzir.

Além das recomendações padrão, deve-se verificar a realpath_cache_sizeopção no php.ini

O padrão é 16k, mas aumentá-lo para algo como 256k economizará segundos do tempo de processamento.

; 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.
; realpath_cache_size=16k
realpath_cache_size
=256k

Além disso, para sistemas com arquivos que não mudam com frequência, o realpath_cache_ttltempo pode ser aumentado dos 120 segundos padrão.

; 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.
; realpath_cache_ttl=120
realpath_cache_ttl
=300