⚡️ Optimize QDMI driver session opening - #2460
Merged
Merged
Conversation
Serialize provider initialization per loaded module so slow initializers do not block unrelated providers. Move owned session defaults through merging and borrow configuration strings during synchronous parameter forwarding. Cover concurrent alias retry, unrelated opening, and configuration buffer reuse by parent and child sessions. Assisted-by: Codex
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Description
A slow provider initializer currently blocks fresh sessions for unrelated cached providers. Serialize initialization per loaded module and keep the global cache mutex limited to lookup/insertion, while preserving module aliases, failure retry, and process-lifetime provider ownership.
Remove two redundant inline-configuration copies by moving the owned session snapshot into merging and borrowing strings during synchronous parameter forwarding. A 16 MiB synthetic payload now needs one payload allocation in the snapshot/merge/construction path instead of three; parent and child sessions share the forwarded buffer.
Add regressions for concurrent alias retry during failed initialization, unrelated opening during that wait, and configuration buffer reuse. Both new regressions fail against the original driver. This change is independent of the pending Client/default-driver work in #2229 and #2230 and does not change the QDMI API.
Local validation: 478 QDMI C++ tests passed, with one existing skip (including all 106 native driver tests); repository lint and changed-file C++ lint passed. In the gated initializer probe, the unrelated open completed before release instead of waiting for the full 200 ms observation interval. These are driver-only measurements, not quantum execution or remote throughput claims.
AI assistance is recorded in the signed commit. Human review remains required.
Checklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).