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 06fbac4
Browse filesBrowse the repository at this point in the historyBrowse files
Replace PhpClassReflectionExtension::evictPrivateSymbols() with a shared LRU over the member caches
The four member caches (methodsIncludingAnnotations, nativeMethods,
propertiesIncludingAnnotations, nativeProperties) were unbounded except for
private members of the just-analysed class. Public/protected member
reflections accumulated for the whole process — measured as the single
largest analysis-growth bucket on a large project (334 MB of a 675 MB
per-process growth at 2,358 files). The private-only eviction also silently
missed the composite `class-scope` cache keys used by getProperty(), because
it compared keys with strict equality against the plain class cache key.
Replace it with a single insertion-ordered LRU over the first-level cache
keys, shared by all four maps: every cache access moves the key to the
most-recently-used position; inserting beyond 2048 keys evicts the least
recently used key's entries from all four maps at once. Misses are pure
recomputation, so eviction cannot change results — verified byte-identical
error output on a 2,358-file project, with no measurable time cost (LRU
bookkeeping is one unset+set per access, and the previous eviction's full
map scan per analysed class is gone).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NrTvR9j1mW2NNNC8RkuTsF
0 commit comments