Skip to content
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

Open
Evangelink opened this issue Apr 25, 2024 · 2 comments
Open

Improve performance of ID generation #2762

Evangelink opened this issue Apr 25, 2024 · 2 comments
Assignees
Milestone

Comments

@Evangelink
Copy link
Member

Evangelink commented Apr 25, 2024

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

@nohwnd
Copy link
Member

nohwnd commented Apr 26, 2024

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

@nohwnd nohwnd self-assigned this May 2, 2024
@nohwnd nohwnd added the sprint label May 2, 2024
@testplatform-bot
Copy link
Contributor

✅ Successfully linked to Azure Boards work item(s):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants