Skip to content

MSTest performance #6317

@Youssef1313

Description

@Youssef1313

This issue tracks few ideas for improving the performance of MSTest.

  • We shouldn't do any serialization for parameterized tests if appdomain is disabled. This will be v4 only where we changed the test id to not rely serialized data.

  • ManagedNameHelper from VSTest is extremely slow and memory consuming (PR: Avoid ManagedNameHelper when possible #6319)

    • Note: on a single test class with 10k tests.

      Image Image Image
  • Dictionary<string, string> used in UpdateInfoIfTestInitializeOrCleanupMethod:

    • is used to act more as of HashSet. So arguably a HashSet will be simply faster.
    • is consuming more time and memory for providing zero functionality if the test class inherits directly from object.
    • Its overall value is too low (prevents considering base initializes if they are shadowed in concrete test class). Should we get rid of it altogether?
    • Switch to HashSet and avoiding it altogether when base type is object is in PR Performance: Reduce unnecessary logic in UpdateInfoIfTestInitializeOrCleanupMethod #6318. Removing the whole thing as "low value" is still an open question.

Metadata

Metadata

Assignees

Labels

Area: MSTestIssues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)Area: Performance

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions