Skip to content

perf(orchestrator): store treehash mapping before graph computation - #266

Open
xytan0056 wants to merge 1 commit into
mainfrom
eager-treehash-cache
Open

perf(orchestrator): store treehash mapping before graph computation#266
xytan0056 wants to merge 1 commit into
mainfrom
eager-treehash-cache

Conversation

@xytan0056

Copy link
Copy Markdown
Contributor

Summary

  • Moves the treehash cache write (BuildDescription → treehash) from after graph computation to before it, so concurrent/subsequent requests can resolve the mapping while the current request is still computing the target graph.
  • Makes the write fire-and-forget: failures are logged as warnings but don't fail the request, since the mapping is a performance optimization, not a correctness requirement.
  • The treehash mapping is a few bytes, so the synchronous Put is negligible compared to graph compute — the win is in timing, not concurrency.

Test plan

  • bazel test //orchestrator/... passes
  • make build passes

@xytan0056
xytan0056 requested review from a team as code owners July 31, 2026 17:45
@xytan0056
xytan0056 force-pushed the eager-treehash-cache branch 2 times, most recently from 00a4520 to 36ea8f4 Compare August 1, 2026 00:53
Move the treehash cache write from after the graph computation to
before it. This lets concurrent or subsequent requests resolve the
BuildDescription→treehash mapping while the current request is still
computing the (potentially slow) target graph.

The write is now fire-and-forget: failures are logged as warnings but
do not fail the request, since the mapping is a performance
optimization, not a correctness requirement.
@xytan0056
xytan0056 force-pushed the eager-treehash-cache branch from 36ea8f4 to 65ad7aa Compare August 1, 2026 01:20
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