You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Slight allocation reduction in CommandLineParser.FlattenArgs (#79139)
* Slight allocation reduction in CommandLineParser.FlattenArgs
This code previously created an ArrayBuilder over the rawArguments given and did some funky manipulations in support of response file handling.
This PR removes that extra ArrayBuilder and it's associated allocations (these lists end up being large enough to exceed the pooling threshold). I think the new code is also a bit easier to understand, particularly in the non-response file section of the code. (No copying into a list, reversing that list, walking it backwards, walking another list backwards, copying into an unused section of the first list, making that section used again, etc)
This only reduces allocations by ~5 MB when opening the roslyn sln, but it also seems simpler and easier to understand.
0 commit comments