Skip to content

Getting filename/extension metadata allocations 1% of solution-wide design-time build #2435

@davkean

Description

@davkean

These two GetDirectoryName calls are allocating 1% of solution-wide design-time builds:

https://github.com/Microsoft/msbuild/blob/6851538897f5d7b08024a6d8435bc44be5869e53/src/Shared/Modifiers.cs#L435-L450

image

Maybe do a Path.IsPathRooted call before it to avoid the allocation? I suspect the majority item specs are not rooted.

Metadata

Metadata

Assignees

Labels

Area: Performancehelp 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

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions