Repository navigation
Conversation
The memoizer evaluates every field and method matcher against every declared member of every memoized type. For outlines whose members haven't been adapted yet, OutlineMembers now visits them with one flyweight MethodOutline / FieldOutline per kind, re-pointed at each member, instead of adapting every member into its own object. Adapted outlines, and types that aren't outline-backed, are visited from their member lists as before. Method annotations of interest are kept as names and adapted only on request. A flyweight is only valid during the visit that passed it; matchers must not retain it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
This branch has not been deployed
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.
What Does This Do
Stacked on #13743. The memoizer evaluates every registered field and method matcher against every declared member of every memoized type. For outlines whose members haven't been adapted yet,
OutlineMembers.visitFields/visitMethodsnow visit them with one flyweightFieldOutline/MethodOutlineper kind, re-pointed at each member in turn, instead of adapting every member into its own object.MethodOutlineandFieldOutlinegain a package-privatepoint(...). Method annotations of interest are kept as names and adapted only when someone asks (most methods have none).Motivation
Measured on PetClinic startup with temporary counters (members visited by the memoizer, and how many any matcher could match):
About 84,000 member objects were built per startup to find a few dozen hits.
Results
master(startup plus traffic), with no transformation failures.OutlineMembersTest: flyweight visits match adapted members field by field, including throughCachingType; adapted types are visited from their lists; context is passed through. Allbytebuddytests inagent-toolingpass.Where the matching cost actually is
Additional Notes
Formatting applied with
spotlessApply.🤖 Generated with Claude Code