Skip to content

Perf cache key 12975303580540440479 - #17

Open
EAbaracus wants to merge 3 commits into
mainfrom
perf-cache-key-12975303580540440479
Open

Perf cache key 12975303580540440479#17
EAbaracus wants to merge 3 commits into
mainfrom
perf-cache-key-12975303580540440479

Conversation

@EAbaracus

Copy link
Copy Markdown
Owner

No description provided.

google-labs-jules Bot and others added 3 commits August 21, 2026 07:57
The `json.dumps()` serialization of the `adapter.policy` inside `_build_cache_key()` was previously run per candidate. This optimization locally caches the serialized string of the policy dict by adapter reference, thus skipping Pydantic model serialization and json encoding on every single candidate. Measurements confirm a roughly 18-20% speedup in cache key creation times for batches of 1000 candidates.

Co-authored-by: EAbaracus <118182665+EAbaracus@users.noreply.github.com>
The `json.dumps()` serialization of the `adapter.policy` inside `_build_cache_key()` was previously run per candidate. This optimization locally caches the serialized string of the policy dict by adapter reference, thus skipping Pydantic model serialization and json encoding on every single candidate. Measurements confirm a roughly 18-20% speedup in cache key creation times for batches of 1000 candidates.

Also formatted `launch_engine/cli/main.py` with black to fix CI.

Co-authored-by: EAbaracus <118182665+EAbaracus@users.noreply.github.com>
Co-authored-by: EAbaracus <118182665+EAbaracus@users.noreply.github.com>
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