Uh oh!
There was an error while loading. Please reload this page.
Optimize VSTestBridge property lookup - #10586
Conversation
Scan only the custom TestCase property store when preserving the original executor URI, avoiding the built-in property concatenation and key snapshot allocations. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Optimizes the per-test-case VSTest bridge executor URI lookup while preserving existing behavior.
Changes:
- Scans only stored custom properties.
- Adds regression coverage for repeated fixups, null values, and URI replacement.
Show a summary per file
| File | Description |
|---|---|
ObjectModelConverters.cs | Optimizes original executor URI detection. |
ObjectModelConvertersTests.cs | Covers fixup behavior and edge cases. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
🧵 Parallel-safety audit — PR #10586Parallelization — assemblies audited:
Findings: A (global-state) This PR only touches
No changes to Top actions: None — no changes needed for parallel-safety. Advisory only — heuristic, non-blocking. Re-run with
|
Uh oh!
There was an error while loading. Please reload this page.
🧪 Expert test review — PR #10586This PR only changes test content in
This advisory comment was generated automatically. Grades are heuristic
|
Uh oh!
There was an error while loading. Please reload this page.
Summary
TestCaseproperties when preserving the original executor URITestCase.Propertiesconcatenation and key-snapshot allocations on the per-test-case hot pathnullvalues, and executor URI replacementPerformance
Independent .NET 9 measurements used
Microsoft.TestPlatform.ObjectModel18.8.0, four custom properties, five 5,000,000-call repetitions, and hit-first/hit-last/no-hit scenarios. The original non-capturing predicate was confirmed to be cached; the savings come from avoidingTestCase.Propertiesenumeration.A manual loop retained the same allocations as each corresponding LINQ path, so this keeps the simpler
Anyexpression.Testing
net462,net8.0, andnet9.0Microsoft.Testing.Extensions.VSTestBridge.UnitTestssuites: 69/69 (net462), 74/74 (net8.0), 74/74 (net9.0)Closes#10585