⚡ Bolt: [performance improvement] eliminate zero-allocation block id references on scheduler tick#54
Conversation
Updated `get_block_outputs_batch` trait to accept `&[(InstanceId, &BlockId)]` instead of `&[(InstanceId, BlockId)]` to eliminate string clones on the scheduler fast path. Added inline comments documenting the optimization reason. Co-authored-by: ovasylenko <3797513+ovasylenko@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Updated `get_block_outputs_batch` trait to accept `&[(InstanceId, &BlockId)]` instead of `&[(InstanceId, BlockId)]` to eliminate string clones on the scheduler fast path. Added inline comments documenting the optimization reason. Fix code formatting to align with stable rustfmt used in CI pipeline. Co-authored-by: ovasylenko <3797513+ovasylenko@users.noreply.github.com>
Updated `get_block_outputs_batch` trait to accept `&[(InstanceId, &BlockId)]` instead of `&[(InstanceId, BlockId)]` to eliminate string clones on the scheduler fast path. Added inline comments documenting the optimization reason. Fix code formatting to align with stable rustfmt used in CI pipeline. Co-authored-by: ovasylenko <3797513+ovasylenko@users.noreply.github.com>
|
Closing as a duplicate of #53, which implemented the identical optimization ( |
Understood. Acknowledging that this work is now obsolete and stopping work on this task. |
💡 What: Changed the
get_block_outputs_batchstorage trait to accept a tuple with a&BlockIdreference rather than an ownedBlockId, allowing callers to simply push borrowed references from iteration loops without.clone()ing.🎯 Why: In
orch8-engine/src/scheduler.rs, the scheduler parses out SLA deadline checks for all incomplete block steps. Previously, checking deadlines allocated a brand new string for every distinctstep_def.id.clone()just to query for an output in the database cache.📊 Impact: Significantly reduces string allocations during the hot path
process_instanceloop ticks, particularly for high-concurrency loops on big sequences.🔬 Measurement: Cargo workspace unit tests run via
cargo test -p orch8-engineandcargo test -p orch8-storageshould pass without performance regressions.PR created automatically by Jules for task 16431544039206705856 started by @ovasylenko