Skip to content

Commit

Permalink
Avoid dictionary resizes when the size is approximately known (#4313)
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 authored Dec 11, 2024
1 parent 6aa7715 commit 19b63cd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,9 @@ private void ExecuteTestsWithTestRunner(
IDictionary<TestProperty, object?> tcmProperties,
IDictionary<string, object> sourceLevelParameters)
{
var testContextProperties = new Dictionary<string, object?>();
// This dictionary will have *at least* 8 entries. Those are the sourceLevelParameters
// which were originally calculated from TestDeployment.GetDeploymentInformation.
var testContextProperties = new Dictionary<string, object?>(capacity: 8);

// Add tcm properties.
foreach (KeyValuePair<TestProperty, object?> propertyPair in tcmProperties)
Expand Down

0 comments on commit 19b63cd

Please sign in to comment.