You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7d43f41
Browse filesBrowse the repository at this point in the historyBrowse files
Store file cache entries serialized instead of as var_export()ed PHP
FileCacheStorage wrote every entry as a PHP file returning a
var_export()ed CacheItem and loaded it with include. Compiling such a file
costs more than unserializing the same data, every object in it is
hydrated through a userland __set_state() call, and the compiled code stays
in memory for the rest of the process.
Entries are now serialize() payloads in *.dat files - the separate
extension keeps an older PHPStan sharing the directory from including a
payload that is not PHP. clearUnusedFiles() (cache version v3-serialized)
deletes the *.php entries of the former formats once.
src/Analyser src/Rules src/Type single process, 8 interleaved pairs, warm
cache: 20.27 s -> 19.69 s user CPU (-2.86 %, 8/8, t = -53), peak RSS
589 MB -> 526 MB (-11 %), output identical. IntermediaryNameScope::intern()
stays: serialize() keeps objects shared within an entry but stores arrays
by value, and skipping the interning measured +38 MB for no CPU gain.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSGnoYacTfJv3taAhZkj5o
0 commit comments