Skip to content

Avoid copying dependencies in the vast majority of dispatches#720

Merged
jviotti merged 1 commit intomainfrom
fast-dispatch
Mar 9, 2026
Merged

Avoid copying dependencies in the vast majority of dispatches#720
jviotti merged 1 commit intomainfrom
fast-dispatch

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented Mar 9, 2026

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

@jviotti jviotti force-pushed the fast-dispatch branch 2 times, most recently from 7d84794 to e4f2b45 Compare March 9, 2026 19:44
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti marked this pull request as ready for review March 9, 2026 19:56
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 9 files

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Index (community)

Details
Benchmark suite Current: d503322 Previous: d4b4243 Ratio
Add one schema (0 existing) 22 ms 19 ms 1.16
Add one schema (100 existing) 79 ms 56 ms 1.41
Add one schema (1000 existing) 648 ms 393 ms 1.65
Cached rebuild (1 existing) 13 ms 11 ms 1.18
Cached rebuild (101 existing) 52 ms 34 ms 1.53
Cached rebuild (1001 existing) 404 ms 251 ms 1.61

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Index (enterprise)

Details
Benchmark suite Current: d503322 Previous: d4b4243 Ratio
Add one schema (0 existing) 25 ms 26 ms 0.96
Add one schema (100 existing) 81 ms 87 ms 0.93
Add one schema (1000 existing) 640 ms 674 ms 0.95
Cached rebuild (1 existing) 14 ms 15 ms 0.93
Cached rebuild (101 existing) 52 ms 55 ms 0.95
Cached rebuild (1001 existing) 405 ms 421 ms 0.96

This comment was automatically generated by workflow using github-action-benchmark.

@jviotti jviotti merged commit ebc7f66 into main Mar 9, 2026
6 checks passed
@jviotti jviotti deleted the fast-dispatch branch March 9, 2026 20:06
@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 9, 2026

🤖 Augment PR Summary

Summary: This PR optimizes the build dispatch pipeline to avoid copying dependency paths in most cases.

Changes:

  • Refactors sourcemeta::one::Build dependency tracking to store static and dynamic dependencies separately.
  • Introduces reference-based dependency passing (std::reference_wrapper<const std::filesystem::path>) so handlers can read dependency paths without extra allocations/copies.
  • Adds a variadic Build::dispatch overload for the common case of a small, fixed number of static dependencies, plus a vector-based overload for bulk dependency sets.
  • Centralizes dispatch completion logic in dispatch_commit and cache-hit evaluation in dispatch_is_cached.
  • Updates dependency persistence (deps.txt) I/O to emit/read s/d lines for static/dynamic deps.
  • Updates index/web generators and build e2e tests to use the new dependency representation (.get()) and new dispatch call shape.

Technical Notes: Cache checks now compare static-dependency lists directly and validate both static and dynamic dependency mtimes against the stored output mark to decide cache hits.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

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