Repository navigation
cut hover latency by caching + warming reflection
A hover on a typed variable fanned worse-reflection's reflectOffset out
into many PHP-stdlib reflections with memoization disabled, and the first
stub reflection paid a cold ~512M phpstorm-stubs map build. Hover took
1.6-3.5s and PhpStorm cancelled it before the popup painted (downstream
ticket hover-latency-unindexed-native-symbols). Three fixes:
- Enable worse-reflection's reflection cache on the session reflector,
collapsing the ~12x same-class reflections a single reflectOffset does.
The cache is name-keyed with no source version, so ReflectionCachePurger
flushes it on every didChange; purges land between hovers, preserving the
intra-hover memoization while an edit always forces re-reflection. - StubCacheWarmer forces the cold phpstorm-stubs map build off the
Initialized handshake (async), so the first hover doesn't pay it. - Variable hover fast-path: a bare $var cursor whose type GenericResolver
can pin renders directly, skipping reflectOffset. Strictly additive --
any miss falls through to the unchanged path.
What's Changed
- v0.3.1: cut hover latency by caching + warming reflection by @math3usmartins in #14
Full Changelog: v0.3.0...v0.3.1