⚡ Bolt: [Zero-Allocation Batch Query Parameters]#51
Conversation
Updates `get_block_outputs_batch` trait signature and implementations to accept `&BlockId` instead of an owned `BlockId` in its keys array. This avoids thousands of `String` clones per minute in the scheduler's deadline check hot-path. 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. |
Updates `get_block_outputs_batch` trait signature and implementations to accept `&BlockId` instead of an owned `BlockId` in its keys array. This avoids thousands of `String` clones per minute in the scheduler's deadline check hot-path. Co-authored-by: ovasylenko <3797513+ovasylenko@users.noreply.github.com>
|
Closing as a duplicate of #53, which implemented the identical optimization ( |
💡 What: Updated the
get_block_outputs_batchsignature inorch8-storageto accept&[(InstanceId, &BlockId)]instead of&[(InstanceId, BlockId)]. Updated the caller inorch8-engine/src/scheduler.rsto pass references.🎯 Why: Previously, the scheduler's deadline check fast-path collected pairs by calling
deadline_keys.push((instance.id, step_def.id.clone())). SinceBlockIdwraps aString, this created thousands of unnecessary heap allocations per minute in highly concurrent setups.📊 Impact: Eliminates
BlockIdstring cloning on the scheduler tick hot-path for SLA checks, significantly reducing memory allocation overhead.🔬 Measurement: Verified the compilation with
cargo checkand ensured all tests inorch8-engineandorch8-storagepass cleanly. Observe reduced heap allocations during scheduler ticks.PR created automatically by Jules for task 5955647547027662294 started by @ovasylenko