-
Notifications
You must be signed in to change notification settings - Fork 262
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
Improve performance of ID generation #2762
Comments
There are 2 instanced of where IDs are generated for each test, which in total take 20% of execution, plus other interactions with ObjectModel (such as adding traits to traits collection). I am not sure where the bottleneck of the id generation is, but it does ask reflection for information that we already have (e.g. information about assembly), and that we could pass in. It also does not seem to handle strings in an efficient way. All the hotspots here are easy to measure by running a test project under PerfView and specifying --list-tests. See the changes here to add stopwatch around the discovery to not take writing to console into account. https://github.com/nohwnd/testfx/tree/discovery-optimize-and-break |
✅ Successfully linked to Azure Boards work item(s): |
@Evangelink can u point me to the code that does the id generation? |
@nohwnd I created the ticket from your feedback but didn't look at it. From the branch you have linked, I see mainly changes to reflection helpers nothing around ID generation. Can you answer @SimonCropp here? |
Managed name and getting test id were the places where I saw it. https://github.com/microsoft/vstest/tree/main/src/Microsoft.TestPlatform.AdapterUtilities The source code is here. |
We have noticed that the ID generation is having an heavy impact on performances of MSTest discovery/run, let's investigate what we can improve and if there are some quick wins let's do them directly.
AB#2050310
The text was updated successfully, but these errors were encountered: