Skip to content

Keep exposure deduplication in a bounded LruTable (FFE optimization) - #13652

Draft
dougqh wants to merge 1 commit into
dougqh/ffe-exposure-cachefrom
dougqh/ffe-exposure-lru
Draft

dougqh wants to merge 1 commit into
dougqh/ffe-exposure-cachefrom
dougqh/ffe-exposure-lru

Conversation

@dougqh

@dougqh dougqh commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Stacked on #13533, the exposure cache.

Moves dd-openfeature's ExposureDeduplicationCache onto the toolbox LruTable: a bounded LRU whose entries carry their own links, so the cache holds one object per subject and allocates nothing per lookup.

This is the FFE half of what used to be #13594. LruTable itself now lands separately in internal-api (#13594, on #13649), where the tracer can use it right away. This branch still carries the toolbox copy of LruTable, because the FFE stack is toolbox-based. Once #13531 moves internal-api's LruTable into the toolbox, this PR shrinks to the ExposureDeduplicationCache change.

Motivation

See #13594 for LruTable's design and benchmarks. For FFE, the exposure cache keeps one object per deduplicated subject instead of a LinkedHashMap node plus key objects.

Additional Notes

🤖 Generated with Claude Code

LruTable.D1 and D2 are bounded least-recently-used tables over chained
buckets whose entries carry their own recency links, so a lookup
allocates nothing and a full table holds one object per key. The bucket
array starts at 16 and doubles as the table fills, up to the size a
fixed table would allocate for the bound, so a table that never fills
never pays for it. At the bound, insert evicts the eldest entry and
returns it.

The exposure cache moves onto LruTable.D2, dropping its own recency list
and lazy table: a cache that sees few subjects now holds a small bucket
array instead of allocating the full 512 KiB one on its first exposure.

LruTableBenchmark compares it with a LinkedHashMap in access order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dougqh dougqh added type: feature Enhancements and improvements tag: performance Performance related changes tag: ai generated Largely based on code generated by an AI or LLM comp: openfeature OpenFeature labels Nov 23, 2026
@pr-commenter

pr-commenter Bot commented Nov 23, 2026

Copy link
Copy Markdown

LLM Validation

LLM Validation Gate — java-agent-instructions

✅ PASS

  • No blocking-case regressions; the quality change is within noise (baseline/candidate confidence intervals overlap).

6 case(s) · quality 81.0 → 82.3 (+1.3) · win-rate 53% [50%–56%]

Details — analysis and per-case results

Analysis

Changed instruction file(s): AGENTS.md.

No safety or blocking-case regressions across 6 case(s). Overall pairwise win-rate 53% [50%–56%], quality +1.3 — see the verdict above for whether that clears the noise band.

Results

  • Pairwise win-rate: 53% [50%–56%] — candidate's share of blind comparisons (90% CI; spanning 50% = no clear difference)
  • Overall quality: 81.0 → 82.3 (/100, +1.3)
  • Bad signals introduced (advisory): 0
  • Candidate criteria coverage (advisory): 23/27 (85%) — expected_criteria the candidate met; does not affect the gate
  • Blocking-case regressions: 0

Cases

Case Mode Quality Δ Win-rate (90% CI) Safety
java-core-validation-001 warn +4.2 67% [49%–84%] ok
java-unit-test-conventions-001 warn +2.8 50% [50%–50%] ok
java-premain-safety-001 warn -2.2 50% [50%–50%] ok
java-ci-download-guidance-001 warn +2.8 50% [50%–50%] ok
java-documentation-only-validation-001 warn +1.1 50% [50%–50%] ok
java-existing-spock-maintenance-001 warn -0.8 50% [50%–50%] ok

Per-dimension scores, token usage, latency, and estimated cost are in the CI job logs.

@dd-octo-sts

dd-octo-sts Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.01 s 13.99 s [-0.6%; +1.0%] (no difference)
startup:insecure-bank:tracing:Agent 12.96 s 13.00 s [-1.0%; +0.3%] (no difference)
startup:petclinic:appsec:Agent 17.22 s 17.10 s [-0.0%; +1.4%] (no difference)
startup:petclinic:iast:Agent 17.01 s 17.10 s [-1.5%; +0.4%] (no difference)
startup:petclinic:profiling:Agent 16.65 s 16.30 s [-2.1%; +6.4%] (no difference)
startup:petclinic:sca:Agent 17.19 s 17.22 s [-0.9%; +0.6%] (no difference)
startup:petclinic:tracing:Agent 16.20 s 16.38 s [-1.9%; -0.3%] (maybe better)

Commit: 10e38b89 · CI Pipeline · Benchmarking Platform UI


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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: openfeature OpenFeature tag: ai generated Largely based on code generated by an AI or LLM tag: performance Performance related changes type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant