Skip to content

perf: Resolve the identity key once per evaluation - #354

Draft
khvn26 wants to merge 1 commit into
perf/00-large-context-benchmarkfrom
perf/01-identity-key-once
Draft

khvn26 wants to merge 1 commit into
perf/00-large-context-benchmarkfrom
perf/01-identity-key-once

Conversation

@khvn26

@khvn26 khvn26 commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

The identity key was resolved again for every feature evaluated, though it is the same throughout an evaluation. It is now resolved once, by evaluate_features and by the dependency resolver, and passed to a single flag result helper, _get_flag_result. get_flag_result_from_context is kept, resolving the key itself, so there is still only one implementation building flag results.

This is the identity key part of #296, rebased onto the current evaluator (variant keys, STATIC/DEFAULT reasons, dependent flags) without duplicating the flag result logic.

Effect: full evaluations 8–17% faster (environment and identity); single-feature evaluation unchanged.

Part of a stack of local evaluation performance PRs; see #353 for the stack and combined results. perf/all holds the whole stack for benchmarking.

The identity key was resolved again for every feature evaluated, though
it is the same throughout an evaluation. It is now resolved once, by
`evaluate_features` and by the dependency resolver, and passed to a single
flag result helper. `get_flag_result_from_context` is kept, resolving
the key itself.
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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