-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Optimize test result processing in PythonResultResolver to improve performance and reduce complexity #25471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…rformance and reduce complexity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the _resolveExecution
method in PythonResultResolver
to eliminate performance bottlenecks that were causing stack overflow issues with parameterized tests. The optimization replaces O(nmk) complexity tree rebuilding with efficient O(1) map-based lookups for test result processing.
Key changes:
- Replaces expensive tree traversal with cached lookup methods using existing maps
- Extracts outcome-specific handling into separate methods for better maintainability
- Adds comprehensive performance test to validate the optimization
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
src/client/testing/testController/common/resultResolver.ts |
Refactors _resolveExecution method to use efficient lookups and extracts outcome handlers into separate methods |
src/test/testing/common/testingAdapter.test.ts |
Adds performance test to validate efficient test result processing without tree rebuilding |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
If the changes appear safe, you can manually trigger the pipeline by commenting |
Co-authored-by: Copilot <[email protected]>
If the changes appear safe, you can manually trigger the pipeline by commenting |
fixes #25366