msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

Reduce unnecessary allocations when accessing information about global properties

Open Forgind opened this issue 3 years ago • 2 comments

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

Forgind avatar Aug 16 '22 00:08 Forgind

@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!

Forgind avatar Aug 22 '22 20:08 Forgind

👍

adrianvmsft avatar Sep 14 '22 16:09 adrianvmsft