perf(endpoints): Add peephole optimizations to endpoint resolution codegen - #7305
Draft
alextwoods wants to merge 1 commit into
Draft
perf(endpoints): Add peephole optimizations to endpoint resolution codegen#7305alextwoods wants to merge 1 commit into
alextwoods wants to merge 1 commit into
Conversation
alextwoods
force-pushed
the
alexwoo/endpoints-bdd-pr4
branch
2 times, most recently
from
August 21, 2026 19:53
d5f508e to
7dcc87a
Compare
alextwoods
force-pushed
the
alexwoo/endpoints-bdd-pr4
branch
from
August 21, 2026 20:28
7dcc87a to
ceef90a
Compare
alextwoods
force-pushed
the
alexwoo/endpoints-bdd-pr4
branch
from
August 21, 2026 20:32
ceef90a to
04e5d8a
Compare
alextwoods
force-pushed
the
alexwoo/endpoints-bdd-pr4
branch
from
August 21, 2026 21:36
04e5d8a to
4cd0955
Compare
Add optimized Endpoint factory methods and a ThreadLocal partition cache to reduce per-resolution allocation overhead: 1. Endpoint.ofAttribute(url, key, value) — uses singletonMap instead of HashMap(16) for the common single-attribute case (AUTH_SCHEMES) 2. Endpoint.of(url) — zero-attribute endpoint without builder 3. Endpoint.ofAttributes(url, k1, v1, k2, v2) — two-attribute case Codegen changes: - CodeGeneratorVisitor emits Endpoint.ofAttribute/of instead of builder pattern when attribute count is known at compile time - BddResultCodeGeneratorVisitor emits same factories for BDD path Runtime changes (RulesFunctions.java.resource): - ThreadLocal awsPartition(region) cache retains last region/partition mapping (~100% hit rate in steady-state single-region usage) - Removed uriEncode and isVirtualHostableS3Bucket caches (profiling showed cache-check overhead comparable to recomputation)
alextwoods
force-pushed
the
alexwoo/endpoints-bdd-pr4
branch
from
August 21, 2026 22:37
4cd0955 to
7454d40
Compare
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.
Motivation and Context
Modifications
Testing
Screenshots (if appropriate)
Types of changes
Checklist
mvn installsucceedsscripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes.License