Skip to content

Conversation

@mtshiba
Copy link
Contributor

@mtshiba mtshiba commented Nov 20, 2025

Currently, the cycle recovery function receives the following arguments:

  • db: &dyn Db
  • id: Id,
  • last_provisional_value: &Output,
  • value: Output,
  • iteration: u32,
  • (input: Input, ...)

After some consideration, we realized that we needed to expose the IDs of all cycle heads, which meant an additional argument was added, and the current approach of passing all information about the cycle to the cycle recovery function one by one would no longer be desirable. Cycle information that can be passed independently of the query function signature should be passed as a single context structure.

In this PR, we will expose this context as Cycle and pass it to the cycle recovery function.

@netlify
Copy link

netlify bot commented Nov 20, 2025

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit ada3ed8
🔍 Latest deploy log https://app.netlify.com/projects/salsa-rs/deploys/691fdae0699934000814e7c2

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 20, 2025

CodSpeed Performance Report

Merging #1028 will degrade performances by 5.01%

Comparing mtshiba:expose-cycle-heads (ada3ed8) with master (a885bb4)

Summary

❌ 1 (👁 1) regression
✅ 12 untouched

Benchmarks breakdown

Benchmark BASE HEAD Change
👁 amortized[SupertypeInput] 2.8 µs 2.9 µs -5.01%

@mtshiba
Copy link
Contributor Author

mtshiba commented Nov 20, 2025

Hmm, it seems like I'm experiencing a consistent regression, but I'm not sure what the direct cause is.

@Veykril
Copy link
Member

Veykril commented Nov 20, 2025

I think you can ignore those, the regressions are in benchmarks that should be irrelevant to your changes so its likely just noise from code location changes

Copy link
Contributor

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

This looks good to me, I only have a few nit comments

@mtshiba mtshiba marked this pull request as ready for review November 21, 2025 03:18
@MichaReiser MichaReiser added this pull request to the merge queue Nov 21, 2025
Merged via the queue into salsa-rs:master with commit 17bc55d Nov 21, 2025
12 checks passed
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.

3 participants