Skip to content

Don't expand list comparisons against empty strings in logging #5614

@dsplaisted

Description

@dsplaisted

Context: dotnet/roslyn#46445

AFAIK, we special case evaluation of conditions such as '@(ReferencePathWithRefAssemblies)' == '' to avoid expanding the item list. However, if we are logging with a verbose enough level (or binlogging, probably), then we will end up expanding the item list anyway. To avoid this, projects can use the following instead: '@(ReferencePathWithRefAssemblies->Count())' == '0'

If possible, we should consider special-casing the log message in cases like this to also avoid expanding the item list.

Metadata

Metadata

Labels

Area: Performancebackloghelp wantedIssues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.triaged

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions