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

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