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

Cache the command lines provider to avoid allocation #2412

Closed
MarcoRossignoli opened this issue Feb 22, 2024 · 1 comment · Fixed by #2680
Closed

Cache the command lines provider to avoid allocation #2412

MarcoRossignoli opened this issue Feb 22, 2024 · 1 comment · Fixed by #2680
Assignees
Labels
Area: Performance Area: Testing Platform Belongs to the Microsoft.Testing.Platform core library sprint
Milestone

Comments

@MarcoRossignoli
Copy link
Contributor

MarcoRossignoli commented Feb 22, 2024

During the command line validation here https://github.com/microsoft/testfx/blob/main/src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineHandler.cs#L55 we're "getting" the options more than one time and we don't own all the command line implementations.
This means that we could allocate more time the options array per command line provider.
We should have a thin layer on the real provider to cache at the first usage and avoid the per check allocations.

AB#2016216

@MarcoRossignoli MarcoRossignoli self-assigned this Feb 22, 2024
@Evangelink Evangelink added Area: Testing Platform Belongs to the Microsoft.Testing.Platform core library and removed Needs: Triage 🔍 labels Feb 22, 2024
@Evangelink Evangelink added this to the 3.4.0 milestone Apr 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
Labels
Area: Performance Area: Testing Platform Belongs to the Microsoft.Testing.Platform core library sprint
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants