Reduce unnecessary allocations when accessing information about global properties
Fixes #7743
I'll fill this out properly later. This is just as an idea of what kind of implementation I think would be best, but I'm open to other ideas.
@arkalyanms
Context
Changes Made
Testing
Notes
@lifengl, @adrianvmsft,
This change was for a perf issue arkalyanms raised a couple months ago. This change relies on the assumption that the GlobalProperties dictionary CPS accesses uses MSBuild's ProjImpl. In theory, you could use a different ProjectLink than that, in which case this wouldn't help, but then you'd control how GlobalProperties is accessed, so I don't think there'd be anything MSBuild can do.
Does this look like it resolves the problem arkalayanms mentioned? If you have a chance, could you try it out and see how much it helps? Thanks!
👍