v0.3.1: cut hover latency by caching + warming reflection#14
Merged
Conversation
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. Unit 1228 green, behat 111 green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rming serverInfo.version 0.3.0 -> 0.3.1 for the v0.3.1 release, which carries the hover-latency work (7098727): the reflection cache + edit-driven purge, the stub-map startup warmer, and the variable hover fast-path. Also: - docs(features): document the reflection cache (per-session, edit-invalidated) and the stub-map startup warming under Performance. - docs(readme): the server targets xphp 0.3.x, not 0.2.x (stale since 0.3.0; composer already requires ^v0.3.0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.