Skip to content

v0.3.1: cut hover latency by caching + warming reflection#14

Merged
math3usmartins merged 2 commits into
mainfrom
0.3.x-dev
Jul 21, 2026
Merged

v0.3.1: cut hover latency by caching + warming reflection#14
math3usmartins merged 2 commits into
mainfrom
0.3.x-dev

Conversation

@math3usmartins

Copy link
Copy Markdown
Member

No description provided.

math3usmartins and others added 2 commits July 21, 2026 09:15
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>
@math3usmartins
math3usmartins requested a review from a team July 21, 2026 07:38
@math3usmartins
math3usmartins merged commit f40a19d into main Jul 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant