Skip to content

Commit

Permalink
Avoid boxing enum (dotnet#9001)
Browse files Browse the repository at this point in the history
Fixes AB#1848255

On .NET Framework this boxes an enum, and allocated 600 MB in a trace I was looking at.
  • Loading branch information
davkean authored and YuliiaKovalova committed Jul 18, 2023
1 parent b63a28c commit af4a811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Build/Evaluation/Evaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2522,7 +2522,7 @@ private string GetCurrentDirectoryForConditionEvaluation(ProjectElement element)

private void RecordEvaluatedItemElement(ProjectItemElement itemElement)
{
if (_loadSettings.HasFlag(ProjectLoadSettings.RecordEvaluatedItemElements))
if ((_loadSettings & ProjectLoadSettings.RecordEvaluatedItemElements) == ProjectLoadSettings.RecordEvaluatedItemElements)
{
_data.EvaluatedItemElements.Add(itemElement);
}
Expand Down

0 comments on commit af4a811

Please sign in to comment.